As an open-source project, we welcome contributions! Please follow the guide below for how to help add to CoVariants!
To make a 'Pull Request' or 'PR,' you'll need to be a little familiar with Github. If you aren't comfortable doing this, but still have some information to share or a suggestion to make, you can make an Issue instead. We may be slower to review and/or implement these, but we still appreciate getting the information!
When possible, you should build the repository locally after making changes, to check that they look how you expect. In particular, mixing Markdown and JSX can be tricky!
If you can't build the repository - that's ok. By creating a PR an automatic build should trigger, allowing you to view the branch. This isn't as fast as building locally, since it's harder to see the difference between each change, but it can be used for small changes or if you can't build locally.
To build locally:
Navigate to covariants/web
and type the folowing commands:
cp .env.example .env
nvm use
then start the development server with:
yarn dev
for Windows, (without Linux Subsystem), try:
yarn dev:start_win
This may take a while to build. Once finished, open a browser and navigate to localhost:3000
. Note that navigating between pages may be slow: your computer is building each page as it needs them.
You can add links, information, or resources by cloning the CoVariants repo, and making changes to the files in covariants/content
for the Home, FAQ, and Per Cluster/Country pages, or covariants/content/clusters
for the Variant pages.
Be sure to preview your changes locally by building the repository (see above).
To add a new variant, you'll need to generate the neccessary files to plot the graphs and make the other figures.
- Add the new variant to
covariants/scripts/clusters.py
following the format of the existing variants.
- Ensure your clone of
CoVariants
is in a sister-repository to the Nextstrainncov
repository (get it here). You will need to follow the guide provided to set up your own build. First, download thenextmeta
andnextfasta
files as described in 'Contextualizing your data' here, and put in thedata
folder renamed asmetadata.tsv
andsequences.fasta
. Then follow the remaining steps to run your own Nextstrain global build, until you have generated the fileresults/sequence-diagnostics.tsv
. You can stop here, if you wish.
- From within the
ncov
directory (which again, should be a sister-directory tocovariants
), runscripts/alClusterDynamics_faster.py
. To test just your variant, you can type in just the name of your variant, or you can re-run all the clusters. - To re-generate the country figure and data, run
scripts/compare_country_lineages.py
(again, from insidencov
).
- Copy the amino-acid sequence from the 'S' or 'Structural protein' (spike) sequence from the reference genome of SARS-CoV-2.
- In your favourite alignment editor, replace the amino acid which reflects the change you wish to show in the protein structure.
- Navigate to CoVsurver and paste in the modified AA sequence, and press 'submit'.
- Use your favourite GIF tool to make a GIF of the picture. Try to adjust it to match the ones already on CoVariants. Copy this file into
covariants/content/proteins/
and ensure the file name matches the 'display name' inclusters.py
.
- After generating all the required files, navigate back to
covariants
and runmake web-data
to convert all the files into the format needed for the website.
You can now try re-building the repository to check that the cluster has been added correctly.