jts / ncov-tools

Small collection of tools for performing quality control on coronavirus sequencing data and genomes
MIT License
47 stars 16 forks source link

Missing amplicon ID error #92

Closed dnhare closed 3 years ago

dnhare commented 3 years ago

Hi there,

I've recently installed ncov-tools but the snakemake script repeatedly fails to execute due to the following error. I'd greatly appreciate any advice as to how to correct this error.

Many thanks.

Dan

Error: At least one layer must contain all faceting variables: amplicon_id.

rdeborja commented 3 years ago

@dnhare Can you tell me which primer scheme you're using? The script that parses the primer file expects the ARTIC primer BED name field format (i.e. nCoV-2019_1_LEFT, nCoV-2019_1_RIGHT).

The input file used to generate the failing plot is qc_sequencing/<samplename>.amplicon_coverage.bed. Can you check the following:

Could you copy and paste the first few lines of a qc_sequencing/*.amplicon_coverage.bed file?

dnhare commented 3 years ago

Thank you very much for your prompt response.

We're using ARTIC V3 primer scheme. The path to the primer_bed in the config.yaml file is: ~/artic-ncov2019/primer_schemes/nCoV-2019/V3/nCoV-2019.primer.bed

Unfortunately, the issue seems to be that we are not generating a qc_sequencing directory, or .amplicon.coverage.bed files.

Are these supposed to be outputs after executing the snakemake script, or outputs from the artic pipeline?

jts commented 3 years ago

This error can occur when the pipeline fails to find any samples. Can you double-check that your bam files are named using the pattern defined in your config.yaml?

On Aug 5, 2021, at 12:01 PM, dnhare @.***> wrote:

 Thank you very much for your prompt response.

We're using ARTIC V3 primer scheme. The path to the primer_bed in the config.yaml file is: ~/artic-ncov2019/primer_schemes/nCoV-2019/V3/nCoV-2019.primer.bed

Unfortunately, the issue seems to be that we are not generating a qc_sequencing directory, or .amplicon.coverage.bed files.

Are these supposed to be outputs after executing the snakemake script, or outputs from the artic pipeline?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

dnhare commented 3 years ago

Thank you @jts

As far as I can tell my bam files are in the pattern specified in my config.yaml (I haven't changed the default pattern of "{data_root}/{sample}.sorted.bam")

The bam files are named in the data_root directory as numbered files e.g. "18.sorted.bam"

There are also corresponding .bam.bai files in that directory e.g. "18.bam.bai" etc.

Do you think this naming structure could be preventing the pipeline from finding any samples?

I've tried renaming some of the bam files and adjusting the config.yaml file accordingly to see if that makes a difference, but I get the same error.

Thanks for your help!

dnhare commented 3 years ago

@jts @rdeborja This was solved by specifying the absolute path to the sample directory in the config.yaml file, and removing '~'

Thanks for your help with this.

rdeborja commented 3 years ago

Thanks for letting us know @dnhare. Great tip in case anyone else encounters the same issue.