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

ValueError: invalid contig 22 #24

Closed
Giuseppe1995 opened this issue Mar 2, 2022 · 2 comments
Closed

ValueError: invalid contig 22 #24

Giuseppe1995 opened this issue Mar 2, 2022 · 2 comments

Comments

@Giuseppe1995
Copy link

Hi,
I am trying to run star_caller.py exactly ad described in the manual, and I am getting this error messages:

INFO:root:Processing sample I-07-1524.normal.finalSorted at 2022-03-02 11:23:54.857425
Traceback (most recent call last):
File "star_caller.py", line 562, in
main()
File "star_caller.py", line 529, in main
cyp2d6_call = d6_star_caller(
File "star_caller.py", line 175, in d6_star_caller
normalized_depth = get_normed_depth(
File "/srv/ngs/analysis/dalteriog/Tools/Cyrius-1.1.1/depth_calling/bin_count.py", line 39, in get_normed_depth
counts_for_normalization, gc_for_normalization, region_type_cn, read_length = count_reads_and_prepare_for_normalization(
File "/srv/ngs/analysis/dalteriog/Tools/Cyrius-1.1.1/depth_calling/bin_count.py", line 187, in count_reads_and_prepare_for_normalization
region_reads = get_read_count(bamfile, region)
File "/srv/ngs/analysis/dalteriog/Tools/Cyrius-1.1.1/depth_calling/bin_count.py", line 103, in get_read_count
reads = bamfile.fetch(region[0], region[1], region[2])
File "pysam/libcalignmentfile.pyx", line 1091, in pysam.libcalignmentfile.AlignmentFile.fetch
File "pysam/libchtslib.pyx", line 685, in pysam.libchtslib.HTSFile.parse_region
ValueError: invalid contig 22.

I am not a python expert, but I think that the error stands, maybe, in the contigs nomenclature. Nevertheless, this is quite odd because all the bam files specified in the MANIFEST_FILE have the following contings nomenclature:

chr1
chr10
chr11
chr12
chr13
chr14
chr15
chr16
chr17
chr18
chr19
chr2
chr20
chr21
chr22
chr3
chr4

chr5
chr6
chr7
chr8
chr9
chrM
chrX
chrY

I don't either think that the problem is the dependencies, as I checked in this issue that I have installed all the packages with at least the version indicated (for some packages I have newer version, but I don't think this should be a problem).
For a matter of completeness, here is the MANIFEST_FILE, where each line specifies a bam full path
manifestBampath.txt

thank you so much in advantage
Giuseppe

@xiao-chen-xc
Copy link
Contributor

Hi @Giuseppe1995 I would guess that you specified the wrong genome in the command. Do you know if your bams are aligned against hg38 or hg19? Based on how your chromosomes are named, it's not GRCh37, but you probably used --genome 37 so that's why there was the error.

@Giuseppe1995
Copy link
Author

thank you, this solved my doubt. Thank you again

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