Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: minor spelling errors #1619

Merged
merged 1 commit into from
Dec 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion auspice.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const parser = new argparse.ArgumentParser({
Auspice is an interactive visualisation tool for phylogenomic data.
It can be used to display local datasets (see "auspice view -h" for details),
or to build a customised version of the software (see "auspice build -h" for details).
This is the software which powers the visualisations on nextstrain.org and auspice.us, amoung others.
This is the software which powers the visualisations on nextstrain.org and auspice.us, among others.
`
});

Expand Down
2 changes: 1 addition & 1 deletion src/actions/filesDropped/parseCsv.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ let Papa; /* lazyily imported once a file is dropped on */
/**
* A promise-ified version of Papa.parse()
* A note on encoding here: It will be common that people drop CSVs from microsoft excel
* in here annd, you guessed it, this causes all sorts of problems.
* in here and, you guessed it, this causes all sorts of problems.
* https://github.com/mholt/PapaParse/issues/169 suggests adding encoding: "ISO-8859-1"
* to the config, which may work
* @param {string} csvString a string of delimited text
Expand Down
8 changes: 4 additions & 4 deletions src/actions/recomputeReduxState.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ const modifyStateViaMetadata = (state, metadata) => {
console.error("Skipping 'display_default' for sidebar as it's not 'open' or 'closed'");
}
} else {
/* most of the time if key=geoResoltion, set both state.geoResolution and state.defaults.geoResolution */
/* most of the time if key=geoResolution, set both state.geoResolution and state.defaults.geoResolution */
state[keysToCheckFor[i]] = metadata.displayDefaults[keysToCheckFor[i]];
state.defaults[keysToCheckFor[i]] = metadata.displayDefaults[keysToCheckFor[i]];
}
Expand Down Expand Up @@ -491,7 +491,7 @@ const checkAndCorrectErrorsInState = (state, metadata, query, tree, viewingNarra
if (metadata.geoResolutions) {
const availableGeoResultions = metadata.geoResolutions.map((i) => i.key);
if (availableGeoResultions.indexOf(state["geoResolution"]) === -1) {
/* fallbacks: JSON defined default, then hardocded default, then any available */
/* fallbacks: JSON defined default, then hardcoded default, then any available */
if (metadata.displayDefaults && metadata.displayDefaults.geoResolution && availableGeoResultions.indexOf(metadata.displayDefaults.geoResolution) !== -1) {
state.geoResolution = metadata.displayDefaults.geoResolution;
} else if (availableGeoResultions.indexOf(defaultGeoResolution) !== -1) {
Expand Down Expand Up @@ -616,7 +616,7 @@ const modifyTreeStateVisAndBranchThickness = (oldState, zoomSelected, controlsSt
newIdxRoot = applyInViewNodesToTree(0, oldState);
}

/* calculate new branch thickesses & visibility, as this depends on the root note */
/* calculate new branch thicknesses & visibility, as this depends on the root note */
const visAndThicknessData = calculateVisiblityAndBranchThickness(
oldState,
controlsState,
Expand Down Expand Up @@ -922,7 +922,7 @@ export const createTreeTooState = ({
secondTreeUrl, /* treeToo URL */
dispatch
}) => {
/* TODO: reconsile choices (filters, colorBys etc) with this new tree */
/* TODO: reconcile choices (filters, colorBys etc) with this new tree */
/* TODO: reconcile query with visibility etc */
let controls = oldState.controls;
const tree = Object.assign({}, oldState.tree);
Expand Down
4 changes: 2 additions & 2 deletions src/actions/tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export const updateVisibleTipsAndBranchThicknesses = (
/**
* date changes need to update tip visibility & branch thicknesses
* this can be done in a single action
* NB calling this without specifing newMin OR newMax is a no-op
* NB calling this without specifying newMin OR newMax is a no-op
* @param {string|false} newMin optional
* @param {string|false} newMax optional
* @return {null} side-effects: a single action
Expand Down Expand Up @@ -333,7 +333,7 @@ const _traverseAndCreateSubtrees = (root, node, attr) => {
// store original children so we traverse the entire tree
const originalChildren = node.hasChildren ? [...node.children] : [];

if (node.arrayIdx === 0) { // __ROOT will hold all (expoded) subtrees
if (node.arrayIdx === 0) { // __ROOT will hold all (exploded) subtrees
node.unexplodedChildren = originalChildren;
} else if (node.hasChildren) {
const parentTrait = getTraitFromNode(node, attr);
Expand Down
2 changes: 1 addition & 1 deletion src/components/datasetLoader/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { connect } from "react-redux";
import { loadJSONs } from "../../actions/loadData";
import { PAGE_CHANGE } from "../../actions/types";

/* The DatsetLoader component simply triggers the (async) loadJSONs action
/* The DatasetLoader component simply triggers the (async) loadJSONs action
* and then redirects to the "main" page (via a PAGE_CHANGE action).
* Note that if the loadJSONs action "fails" it will subsequently redirect to a 404 page
*/
Expand Down
8 changes: 4 additions & 4 deletions src/components/download/helperFunctions.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export const areAuthorsPresent = (tree) => {

/**
* Create & write a TSV file where each row is an author,
* with the relevent information (num isolates, journal etcetera)
* with the relevant information (num isolates, journal etcetera)
*/
export const authorTSV = (dispatch, filePrefix, tree) => {
const lineArray = [];
Expand Down Expand Up @@ -170,7 +170,7 @@ export const authorTSV = (dispatch, filePrefix, tree) => {

/**
* Create & write a TSV file where each row is a strain in the tree,
* with the relevent information (accession, traits, etcetera).
* with the relevant information (accession, traits, etcetera).
* Only visible nodes (tips) will be included in the file.
*/
export const strainTSV = (dispatch, filePrefix, nodes, colorings, nodeVisibilities) => {
Expand Down Expand Up @@ -205,7 +205,7 @@ export const strainTSV = (dispatch, filePrefix, nodes, colorings, nodeVisibiliti
}

/* collect values (as writable strings) of the same "traits" as can be viewed by the modal displayed
when clicking on tips. Note that "num_date", "author" and "vaccine" are considered seperately below */
when clicking on tips. Note that "num_date", "author" and "vaccine" are considered separately below */
const nodeAttrsToIgnore = ["author", "div", "num_date", "vaccine", "accession"];
const traits = Object.keys(node.node_attrs).filter((k) => !nodeAttrsToIgnore.includes(k));
for (const trait of traits) {
Expand Down Expand Up @@ -455,7 +455,7 @@ const injectAsSVGStrings = (output, key, data) => {
output.push("</svg>");
};

/* define actual writer as a closure, because it may need to be triggered asyncronously */
/* define actual writer as a closure, because it may need to be triggered asynchronously */
const writeSVGPossiblyIncludingMap = (dispatch, filePrefix, panelsInDOM, panelLayout, textStrings, map) => {
const errors = [];
/* for each panel present in the DOM, create a data structure with the dimensions & the paths/shapes etc */
Expand Down
4 changes: 2 additions & 2 deletions src/components/entropy/entropyD3.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ EntropyChart.prototype.render = function render(props) {
this._drawMainNavElements();
this._addZoomLayers();
this._setScales(this.maxNt + 1, props.maxYVal);
/* If only a gene/nuc, zoom to that. If zoom min/max as well, that takes precidence */
/* If only a gene/nuc, zoom to that. If zoom min/max as well, that takes precedence */
this.zoomCoordinates = isColorByGenotype(props.colorBy) ?
this._getZoomCoordinates(decodeColorByGenotype(props.colorBy, props.geneLength), props.geneMap) :
this.scales.xNav.domain(); // []; /* set zoom to specified gene or to whole genome */
Expand Down Expand Up @@ -466,7 +466,7 @@ EntropyChart.prototype._addBrush = function _addBrush() {
return d3Event && d3Event.sourceEvent && d3Event.sourceEvent.type === 'zoom';
}

/* zooms in by modifing the domain of xMain scale */
/* zooms in by modifying the domain of xMain scale */
this._zoom = function _zoom(start, end) {
const s = [start, end];
this.scales.xMain.domain(s);
Expand Down
2 changes: 1 addition & 1 deletion src/components/entropy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class Entropy extends React.Component {
if (newMutType !== this.props.mutType) {
/* 1. switch the redux colorBy back to the default */
this.props.dispatch(changeColorBy(this.props.defaultColorBy));
/* 2. update the mut type in redux & re-calulate entropy */
/* 2. update the mut type in redux & re-calculate entropy */
this.props.dispatch(changeMutType(newMutType));
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/framework/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ const FooterStyles = styled.div`

export const getAcknowledgments = (metadata, dispatch) => {
/**
* If the metadata contains a description key, then it will take precendence the hard-coded
* acknowledgements. Expects the text in the description to be in Mardown format.
* If the metadata contains a description key, then it will take precedence the hard-coded
* acknowledgements. Expects the text in the description to be in Markdown format.
* Jover. December 2019.
*/
if (metadata.description) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const Measurements = lazy(() => import("../measurements"));
class Main extends React.Component {
constructor(props) {
super(props);
/* window listner employed to toggle switch to mobile display.
/* window listener employed to toggle switch to mobile display.
NOTE: this used to toggle sidebar open boolean when that was stored
as state here, but his has since ben moved to redux state. The mobile
display should likewise be lifted to redux state */
Expand Down
2 changes: 1 addition & 1 deletion src/components/main/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { controlsWidth, controlsPadding } from "../../util/globals";


export const calcPanelDims = (panels, narrativeIsDisplayed, availableWidth, availableHeight) => {
/* Calculate reponsive geometries. chart: entropy, frequencies. full/grid: map, tree, measurements */
/* Calculate responsive geometries. chart: entropy, frequencies. full/grid: map, tree, measurements */
const chartWidthFraction = 1;
const fullWidthFraction = 1;
const gridWidthFraction = 0.5;
Expand Down
6 changes: 3 additions & 3 deletions src/components/map/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ class Map extends React.Component {
this.props.showTransmissionLines,
);

// don't redraw on every rerender - need to seperately handle virus change redraw
// don't redraw on every rerender - need to separately handle virus change redraw
this.setState({
boundsSet: true,
d3elems,
Expand Down Expand Up @@ -296,7 +296,7 @@ class Map extends React.Component {

if (!this.state.demeData || !this.state.transmissionData) {
/* this seems to happen when the data takes a particularly long time to create.
and the map is ready before the data (??). It's imperitive that this method runs
and the map is ready before the data (??). It's imperative that this method runs
so if the data's not ready yet we try to rerun it after a short time.
This could be improved */
window.setTimeout(() => this.respondToLeafletEvent(leafletEvent), 50);
Expand Down Expand Up @@ -358,7 +358,7 @@ class Map extends React.Component {
/**
* updates demes & transmissions when redux (tree) visibility or colorScale (i.e. colorBy) has changed
* returns early if the map or tree isn't ready
* uses deme & transmission indicies for smart (quick) updating
* uses deme & transmission indices for smart (quick) updating
*/
maybeUpdateDemesAndTransmissions(nextProps) {
if (!this.state.map || !this.props.treeLoaded || !this.state.d3elems) { return; }
Expand Down
2 changes: 1 addition & 1 deletion src/components/map/mapHelpersLatLong.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ const setupDemeData = (nodes, visibility, geoResolution, nodeColors, triplicate,
const coords = leafletLatLongToLayerPoint(lat, long, map);

/* add entries to
* (1) `demeIndicies` -- a dict of "deme value" to the indicies of `demeData` & `arcData` where they appear
* (1) `demeIndices` -- a dict of "deme value" to the indices of `demeData` & `arcData` where they appear
* (2) `demeData` -- an array of objects, each with {name, count etc.}
* if pie charts, then `demeData.arcs` exists, if colour-blended circles, `demeData.color` exists
*/
Expand Down
2 changes: 1 addition & 1 deletion src/components/measurements/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const isVisible = (visibility) => visibility === NODE_VISIBLE;
* are relevant for the Measurement's panel. Uses the colorScale redux state to
* find the current color attribute per strain.
*
* tree.visiblity and tree.nodeColors need to be an arrays that have the same
* tree.visibility and tree.nodeColors need to be arrays that have the same
* order as tree.nodes
* @param {Object} state
* @returns {Object<string,Object>}
Expand Down
6 changes: 3 additions & 3 deletions src/components/measurements/measurementsD3.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export const drawMeasurementsSVG = (ref, svgData) => {
// Create a subplot for each grouping
let prevSubplotBottom = layout.topPadding;
groupedMeasurements.forEach(([groupingValue, measurements], index) => {
// Make each subplot it's own SVG to re-use the same subplot yScale
// Make each subplot its own SVG to re-use the same subplot yScale
const subplot = svg.append("svg")
.attr("class", classes.subplot)
.attr("id", getSubplotDOMId(groupingOrderedValues.indexOf(groupingValue)))
Expand Down Expand Up @@ -222,7 +222,7 @@ export const drawMeasurementsSVG = (ref, svgData) => {
// If necessary, scale down the text to fit in the available space for the y-Axis labels
// This does mean that if the text is extremely long, it can be unreadable.
// We can improve on this by manually splitting the text into parts that can fit on multiple lines,
// but there's always limits of the available space so punting that for now.
// but there're always limits of the available space so punting that for now.
// -Jover, 20 September 2022
g.selectAll('text')
.attr("transform", (_, i, element) => {
Expand Down Expand Up @@ -283,7 +283,7 @@ export const colorMeasurementsSVG = (ref, treeStrainColors) => {
export const drawMeansForColorBy = (ref, svgData, treeStrainColors, legendValues) => {
const { xScale, groupingOrderedValues, groupedMeasurements } = svgData;
const svg = select(ref);
// Re move all current color by means
// Remove all current color by means
svg.selectAll(`.${classes.colorMean}`).remove();
// Calc and draw color by means for each group
groupedMeasurements.forEach(([groupingValue, measurements]) => {
Expand Down
4 changes: 2 additions & 2 deletions src/components/narrative/MainDisplayMarkdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ const MarkdownDisplay = lazy(() => import("../markdownDisplay"));
/**
* The following code borrows heavily from the Footer
* but is here in order to allow modifications with no side
* effects to the Footer. This work was done in an expidited fashion
* for nCoV but this should be revisted and improved when we have
* effects to the Footer. This work was done in an expedited fashion
* for nCoV but this should be revisited and improved when we have
* time. james. Jan 24 2020
*/

Expand Down
4 changes: 2 additions & 2 deletions src/components/narrative/MobileNarrativeDisplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const scrollToTop = () => {

const explanationParagraph=`
<p class="explanation">
Narratives are interleaved sections of text and associated nextstrain visualisations of the genomic data.
Narratives are interleaved sections of text and associated Nextstrain visualisations of the genomic data.
Click the coloured arrows at the top & bottom of each page to move through this narrative.
Within each page, you can scroll through the text to see visualisations of the genomic data.
</p>
Expand Down Expand Up @@ -79,7 +79,7 @@ class MobileNarrativeDisplay extends React.Component {
));
scrollToTop();
};
// TODO: bind down & up arrows (is this ok since we also have scollable content?)
// TODO: bind down & up arrows (is this ok since we also have scrollable content?)
}

pageNarrativeContent() {
Expand Down
2 changes: 1 addition & 1 deletion src/components/narrative/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class Narrative extends React.Component {
this.reactPageScroller.goToPage(this.props.currentInFocusBlockIdx);
}
/* bind arrow keys to move around in narrative */
/* Note that "normal" page scrolling is not avaialble in narrative mode
/* Note that "normal" page scrolling is not available in narrative mode
and that scrolling the sidebar is associated with changing the narrative slide */
Mousetrap.bind(['left', 'up'], this.goToPreviousSlide);
Mousetrap.bind(['right', 'down'], this.goToNextSlide);
Expand Down
2 changes: 1 addition & 1 deletion src/components/narrativeEditor/markdownInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const MarkdownInput = ({fileName, setNarrative, setError}) => {

/** promisify FileReader's readAsText() so we can use it within
* async functions via `await readJson(file)`.
* Originally addapted from https://stackoverflow.com/a/51026615
* Originally adapted from https://stackoverflow.com/a/51026615
* Taken from https://github.com/nextstrain/auspice.us/blob/427c138dcfce1f0e6fff8049dacc4e416304ff7a/auspice_client_customisation/handleDroppedFiles.js#L24-L44
*/
function readFile(file, isJSON=true) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/tree/legend/legend.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ class Legend extends React.Component {
}

render() {
// catch the case where we try to render before anythings ready
// catch the case where we try to render before anything's ready
if (!this.props.colorScale) return null;
return (
<svg
Expand Down
2 changes: 1 addition & 1 deletion src/components/tree/phyloTree/grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ const calculateTemporalGridSeperation = (timeRange, pxAvailable) => {
}
/* how many of those "units" should ideally fit into each major grid separation? */
majorStep.n = Math.floor(timeBetweenMajorGrids/levels[majorStep.unit].t) || 1;
/* if the numer of units (per major grid) is above the allowed max, use a bigger unit */
/* if the number of units (per major grid) is above the allowed max, use a bigger unit */
if (levels[majorStep.unit].max && majorStep.n > levels[majorStep.unit].max) {
majorStep.unit = levelsKeys[levelsKeys.indexOf(majorStep.unit)-1];
majorStep.n = Math.floor(timeBetweenMajorGrids/levels[majorStep.unit].t) || 1;
Expand Down
2 changes: 1 addition & 1 deletion src/components/tree/phyloTree/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const setDisplayOrderRecursively = (node, yCounter) => {
node.displayOrderRange = [yCounter, yCounter];
return yCounter;
}
/* if here, then all children have displayOrders, but we dont. */
/* if here, then all children have displayOrders, but we don't. */
node.displayOrder = children.reduce((acc, d) => acc + d.shell.displayOrder, 0) / children.length;
node.displayOrderRange = [children[0].shell.displayOrder, children[children.length - 1].shell.displayOrder];
return yCounter;
Expand Down
2 changes: 1 addition & 1 deletion src/components/tree/phyloTree/layouts.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const setLayout = function setLayout(layout, scatterVariables) {
};

/**
* assignes x,y coordinates for a rectancular layout
* assignes x,y coordinates for a rectangular layout
* @return {null}
*/
export const rectangularLayout = function rectangularLayout() {
Expand Down
2 changes: 1 addition & 1 deletion src/components/tree/reactD3Interface/change.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const changePhyloTreeViaPropsComparison = (mainTree, phylotree, oldProps,
Note that updating properties itself won't trigger any visual changes */
phylotree.dateRange = [newProps.dateMinNumeric, newProps.dateMaxNumeric];

/* catch selectedStrain dissapearence seperately to visibility and remove modal */
/* catch selectedStrain disappearance separately to visibility and remove modal */
if (oldTreeRedux.selectedStrain && !newTreeRedux.selectedStrain) {
/* TODO change back the tip radius */
newState.selectedNode = {};
Expand Down
2 changes: 1 addition & 1 deletion src/components/tree/reactD3Interface/initialRender.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const renderTree = (that, main, phylotree, props) => {
onTipLeave: callbacks.onTipLeave.bind(that),
tipLabel: makeTipLabelFunc(props.tipLabelKey)
},
treeState.branchThickness, /* guarenteed to be in redux by now */
treeState.branchThickness, /* guaranteed to be in redux by now */
treeState.visibility,
props.temporalConfidence.on, /* drawConfidence? */
treeState.vaccines,
Expand Down
2 changes: 1 addition & 1 deletion src/components/tree/tangle/unusedUntanglingCode.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/** applyToNodesPostOrder
* recursivly apply the callback to each node postorder (root to tip, go left as far as you can, then backtrack...)
* recursively apply the callback to each node postorder (root to tip, go left as far as you can, then backtrack...)
*/
// const applyToNodesPostOrder = (node, callback) => {
// if (node.children) {
Expand Down
Loading