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

Chromosome names #5

Open
Liverworks opened this issue Oct 7, 2022 · 2 comments
Open

Chromosome names #5

Liverworks opened this issue Oct 7, 2022 · 2 comments

Comments

@Liverworks
Copy link

Liverworks commented Oct 7, 2022

Hi!

I am trying to use Aquila_stLFR for an animal species. My reference fasta has chromosome names like Scaffold_[number], not chr[number].

Preprocessing was OK, but on step1 I get errors:

4799941
36.012870783203375
21.0
389026.0
3.0
Traceback (most recent call last):
  File "/home/aglushkevich/.conda/envs/anpython3/lib/python3.7/site-packages/bin/Run_h5_all_multithreads.py", line 148, in save_variant_dict
    chr_num = int(data[0][3:])
ValueError: invalid literal for int() with base 10: 'ffold_2'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/aglushkevich/.conda/envs/anpython3/lib/python3.7/site-packages/bin/Run_h5_all_multithreads.py", line 591, in <module>
    variant_dict = save_variant_dict(vcf_file,mbq_threshold,avg_depth,out_dir)
  File "/home/aglushkevich/.conda/envs/anpython3/lib/python3.7/site-packages/bin/Run_h5_all_multithreads.py", line 190, in save_variant_dict
    variant_dict[(chr_num,pos)] = [ref,alt,GT]
UnboundLocalError: local variable 'chr_num' referenced before assignment
[main_samview] region "chr16" specifies an unknown reference name. Continue anyway.
[main_samview] region "chr1" specifies an unknown reference name. Continue anyway.
[main_samview] region "chr2" specifies an unknown reference name. Continue anyway.
samtools depth: can't parse region "chr16"
samtools depth: can't parse region "chr2"
samtools depth: can't parse region "chr1"

Can it be fixed, or should I change my reference contig names?

@maiziex
Copy link
Owner

maiziex commented Oct 9, 2022

Hi, Aquila_stLFR only uses regular reference fasta file and the contig name needs to be "chr1", "chr2", etc.

@maiziex
Copy link
Owner

maiziex commented Oct 9, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants