{"id":22403251,"url":"https://github.com/andersen-lab/cryptic-variants","last_synced_at":"2026-03-19T22:44:42.669Z","repository":{"id":169500927,"uuid":"645073977","full_name":"andersen-lab/Cryptic-Variants","owner":"andersen-lab","description":null,"archived":false,"fork":false,"pushed_at":"2023-11-06T16:30:42.000Z","size":51,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T06:25:12.258Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Nextflow","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andersen-lab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-24T21:39:57.000Z","updated_at":"2024-06-21T16:13:46.000Z","dependencies_parsed_at":"2023-11-07T00:50:56.478Z","dependency_job_id":null,"html_url":"https://github.com/andersen-lab/Cryptic-Variants","commit_stats":null,"previous_names":["dylanpilz/cryptic-variants","andersen-lab/cryptic-variants"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andersen-lab%2FCryptic-Variants","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andersen-lab%2FCryptic-Variants/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andersen-lab%2FCryptic-Variants/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andersen-lab%2FCryptic-Variants/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andersen-lab","download_url":"https://codeload.github.com/andersen-lab/Cryptic-Variants/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245760928,"owners_count":20667893,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-05T09:16:33.663Z","updated_at":"2026-01-06T07:48:07.227Z","avatar_url":"https://github.com/andersen-lab.png","language":"Nextflow","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cryptic Variant Detection\n\n[![nextflow](https://img.shields.io/badge/nextflow-%E2%89%A50.24.0-brightgreen.svg)](http://nextflow.io)\n\nSARS-CoV-2 wastewater cryptic variant detection pipeline.\n\n## Installation\n---\n\n### Install via Git\n```\ngit clone https://github.com/dylanpilz/cryptic-variants.git\ncd cryptic-variants\n```\n## Environment setup\n---\n\n#### Via conda:\n```\nconda env create -f environment.yml\nconda activate cryptic-variants\n```\n#### Via mamba:\n```\nmamba create -n cryptic-variants\nmamba env update -n cryptic-variants --file environment.yml\nmamba activate cryptic-variants\n```\n\n## Usage\n---\n### GISAID Authentication\nTo access data from GISAID, you must have a GISAID account. In order to authenticate your credentials, run the following command:\n```\npython -c \"from outbreak_data import authenticate_user; authenticate_user.authenticate_new_user()\"\n```\nThis will provide a link prompting you to enter your GISAID username and password. Once completed, your token will be saved and you will not need to authenticate again.\n\n### Running the pipeline\n```\nnextflow run main.nf -entry [from_fastq|from_bam] --input_dir \u003cpath/to/input/dir\u003e  --output_dir \u003cpath/to/output/dir\u003e \n```\nSet `-entry` to `from_fastq` if you are providing paired fastq files, or `from_bam` if you are providing aligned bam files. In the output directory, you will find a `cryptic_variants` directory containing potential cryptic variants, as well as a `covariants` directory containing the output from `freyja covariants` for the provided samples (see [freyja](https://github.com/andersen-lab/Freyja)).\n\n### Optional parameters\n```\n--ref \u003cpath/to/reference.fasta\u003e\n            Reference genome to use for alignment and covariant detection\n            (default: data/NC_045512.2_Hu-1.fasta)\n--gff_file \u003cpath/to/gff_file.gff\u003e\n            GFF file containing gene annotations\n            (default: data/NC_045512.2_Hu-1.gff)\n--primer_bed \u003cpath/to/primer.bed\u003e\n            BED file containing primer locations for primer trimming\n            (default: data/nCoV-2019_v3.primer.bed)\n--skip_trimming \u003ctrue|false\u003e\n            Whether or not to trim primer sequences from reads. If true, primer\n            trimming will be skipped.\n            (default: false)\n--min_site \u003cint\u003e\n            Minimum genomic site to consider for cryptic variant detection\n            (default: 22556) (RBD start)\n--max_site \u003cint\u003e\n            Maximum genomic site to consider for cryptic variant detection\n            (default: 23156) (RBD end)\n--min_WW_count \u003cint\u003e\n            Minimum number of wastewater hits to consider a cluster of\n            variants in a given sample\n            (default: 30)\n--max_clinical_count \u003cint\u003e\n            Maximum number of clinical hits for a variant to be considered\n            cryptic\n            (default: 5)\n--location_id \u003cstr\u003e\n            Location ID to query from GISAID\n            (default: 'global')\n```\n### Output\n\nThe pipeline produces two output directories: `cryptic_variants` and `covariants`. The `cryptic_variants` directory will contain a `{sample}.covariants.cryptic.tsv` for each sample in the input directory. This file contains the following columns:\n\n`Covariants`\n    Mutation cluster detected\n`WW_Count`\n    Number of wastewater hits for the mutation cluster in this sample\n`Clinical_Count`\n    Number of clinical hits for the mutation cluster in this sample\n`Lineages`\n    Lineages associated with the mutation cluster (if any)\n\n```\nCovariants      WW_Count        Clinical_Count  Lineages\n['S:G416E', 'S:K417N', 'S:N440K', 'S:L452Q']    12      0       NA\n['S:K417N', 'S:S438P', 'S:N440K', 'S:L452Q']    14      0       NA\n['S:K417N', 'S:Y421H', 'S:N440K', 'S:L452Q']    11      0       NA\n['S:G416G', 'S:K417N', 'S:N440K', 'S:L452Q']    11      2       ['ba.2.12.1']\n['S:K417N', 'S:N440K', 'S:G446G', 'S:L452Q']    14      2       ['bg.5']\n['S:K417N', 'S:N440K', 'S:L452Q', 'S:F456F']    15      2       ['ba.2.12.1']\n```\n\nThe `covariants` directory contains the raw output from [freyja covariants](https://github.com/andersen-lab/Freyja).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandersen-lab%2Fcryptic-variants","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandersen-lab%2Fcryptic-variants","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandersen-lab%2Fcryptic-variants/lists"}