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

Custom GFF file failing ivar_variants_to_vcf.py with release 2.5 #321

Closed
afonsoguerra opened this issue Jul 19, 2022 · 9 comments
Closed
Assignees
Labels
bug Something isn't working
Milestone

Comments

@afonsoguerra
Copy link

Description of the bug

I've been using a custom GFF file, I've added here in attached, when running viralrecon to highlight variants in the NSP12 which is not highlighted by default in the default GFF. This has worked fine up to version 2.4.1, it now fails in version 2.5.

While I have modified some other parameters, I've excluded them and the custom gff is necessary and sufficient to reproduce the issue.

Command used and terminal output

nextflow run nf-core/viralrecon -r 2.5 -profile singularity,test --outdir tttest --gff 'refannot.gff'



Error: 

Error executing process > 'NFCORE_VIRALRECON:ILLUMINA:VARIANTS_IVAR:IVAR_VARIANTS_TO_VCF (SAMPLE2_PE)'

Caused by:
  Process `NFCORE_VIRALRECON:ILLUMINA:VARIANTS_IVAR:IVAR_VARIANTS_TO_VCF (SAMPLE2_PE)` terminated with an error exit status (1)

Command executed:

  ivar_variants_to_vcf.py \
      SAMPLE2_PE.tsv \
      SAMPLE2_PE.vcf \
      --fasta nCoV-2019.reference.fasta \
      --ignore_strand_bias \
      > SAMPLE2_PE.variant_counts.log
  
  cat ivar_variants_header_mqc.txt SAMPLE2_PE.variant_counts.log > SAMPLE2_PE.variant_counts_mqc.tsv
  
  cat <<-END_VERSIONS > versions.yml
  "NFCORE_VIRALRECON:ILLUMINA:VARIANTS_IVAR:IVAR_VARIANTS_TO_VCF":
      python: $(python --version | sed 's/Python //g')
  END_VERSIONS

Command exit status:
  1

Command output:
  (empty)

Command error:
  Traceback (most recent call last):
    File "/home/xxxx/.nextflow/assets/nf-core/viralrecon/bin/ivar_variants_to_vcf.py", line 577, in <module>
      sys.exit(main())
    File "/home/xxxx/.nextflow/assets/nf-core/viralrecon/bin/ivar_variants_to_vcf.py", line 552, in main
      fe_codon_ref = variants[next(iter(variants))]["ref_codon"]
  StopIteration

Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh`

Relevant files

refannot.gff.gz

System information

  N E X T F L O W
  version 22.04.0 build 5697
  created 23-04-2022 18:00 UTC (19:00 BST)
  cite doi:10.1038/nbt.3820
  http://nextflow.io

Linux step.local 3.10.0-1160.49.1.el7.x86_64 #1 SMP Tue Nov 30 15:51:32 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

HPC running singularity
local executor
singularity containers
viralrecon 2.5

@afonsoguerra afonsoguerra added the bug Something isn't working label Jul 19, 2022
@afonsoguerra
Copy link
Author

Just to add that I now found a sample that triggers the same error even with the default GFF file. I can't share that data, but it is just making this issue a bit more urgent for me. Can someone have a look or give me some pointers?

Thanks,
Afonso

@drpatelh
Copy link
Member

Ping @saramonzon @svarona

@saramonzon
Copy link
Contributor

Yes, we've already fixed that, I have to make a PR!

@afonsoguerra
Copy link
Author

Thanks everyone. I have now been working with the dev version for a while and all seems to be working as it should.

@Rohit-Satyam
Copy link

Rohit-Satyam commented Oct 26, 2022

@saramonzon I am still getting the same error. I tried to run ivar_variants_to_vcf.py separately on my ivar.tsv file but it terminates.

(temp) python ~/Documents/COVID_Project/nextCov/modules/ivar_variants_to_vcf.py temp.ivar.tsv temp.ivar.vcf -is -f ../00_index/Sars_cov_2.ASM985889v3.dna.toplevel.fa
Traceback (most recent call last):
  File "/home/subudhak/Documents/COVID_Project/nextCov/modules/ivar_variants_to_vcf.py", line 575, in <module>
    sys.exit(main())
  File "/home/subudhak/Documents/COVID_Project/nextCov/modules/ivar_variants_to_vcf.py", line 518, in main
    ) = process_variants(variants, num_collapse)
  File "/home/subudhak/Documents/COVID_Project/nextCov/modules/ivar_variants_to_vcf.py", line 392, in process_variants
    var = next(iter_variants)
StopIteration

Got it working with code in dev branch. Sorry didn't read the @afonsoguerra comment.

@saramonzon
Copy link
Contributor

Yeah! Great to hear, that dev works :)

@drpatelh
Copy link
Member

@afonsoguerra @Rohit-Satyam can I confirm that this issue is fixed already by using the code on the dev branch please?

@afonsoguerra
Copy link
Author

Yes. There are issues with the code in edge cases, but this particular issue has been resolved. Thank you!

@drpatelh
Copy link
Member

Awesome! Thanks for the quick response. Please feel free to submit individual issues for the edge cases you mentioned and we will try to fix in future releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants