FRED-2 / OptiType

Precision HLA typing from next-generation sequencing data
BSD 3-Clause "New" or "Revised" License
181 stars 74 forks source link

Optitype mapping error? #73

Closed ghost closed 6 years ago

ghost commented 6 years ago

Hi,

I'm running optitype in rna mode for fastq.gz files. I get a large cryptic error that I'm not really able to figure out. Can someone help me translate this? See the command and error below:

Thanks,

-todd

OptiType-master/OptiTypePipeline.py --rna --verbose --config /Biomarker/ngs/software/OptiType/OptiType-master/config.ini -i /ts19/ngs/studies/ngs_000230/fastq/TB2-EM11595_R1.fastq.gz /ts19/ngs/studies/ngs_000230/fastq/TB2-EM11595_R2.fastq.gz -o /ts19/ngs/studies/ngs_000230/neoantigen_analysis/optitype

0:00:03.82 Mapping TB2-EM11595_R1.fastq.gz to NUC reference... /home/mi/esiragusa/seqan/include/seqan/basic/basic_exception.h:368 FAILED! (Uncaught exception of type seqan::UnexpectedEnd: Unexpected end of input.)

stack trace: 0 [0xa9d3f7] /Biomarker/ngs/software/razers3/razers3-3.4.0-Linux-x86_64/bin/razers3() 1 [0xab37a6] cxxabiv1::terminate(void (*)()) + 0x6 2 [0xab37d3] /Biomarker/ngs/software/razers3/razers3-3.4.0-Linux-x86_64/bin/razers3() 3 [0xab491e] /Biomarker/ngs/software/razers3/razers3-3.4.0-Linux-x86_64/bin/razers3() 4 [0x76b253] /Biomarker/ngs/software/razers3/razers3-3.4.0-Linux-x8664/bin/razers3() 5 [0x7ce297] void seqan::readRecord<seqan::String<char, seqan::Alloc >, seqan::String<seqan::SimpleType<unsigned char, seqan::Dna5Q>, seqan::Alloc >, seqan::String<char, seqan::Alloc >, seqan::Iter<seqan::VirtualStream<char, seqan::Tag, std::chartraits >, seqan::StreamIterator<seqan::Tag<seqan::Input> > > >(seqan::String<char, seqan::Alloc >&, seqan::String<seqan::SimpleType<unsigned char, seqan::Dna5Q>, seqan::Alloc >&, seqan::String<char, seqan::Alloc >&, seqan::Iter<seqan::VirtualStream<char, seqan::Tag<seqan::Input>, std::chartraits >, seqan::StreamIterator<seqan::Tag<seqan::Input> > >&, seqan::Tag) + 0x77 6 [0x81924c] bool seqan::loadReads<MyFragStoreConfig, seqan::FragmentStoreConfig, seqan::RazerSOptions<seqan::RazerSSpec<false, false> > >(seqan::FragmentStore<MyFragStoreConfig, seqan::FragmentStoreConfig >&, seqan::FormattedFile<seqan::Tag, seqan::Tag, void>&, seqan::RazerSOptions<seqan::RazerSSpec<false, false> >&) + 0x4ec 7 [0xa9c205] int mapReads<seqan::RazerSSpec<false, false> >(seqan::StringSet<seqan::String<char, seqan::Alloc >, seqan::Owner<seqan::Tag > >&, seqan::StringSet<seqan::String<char, seqan::Alloc >, seqan::Owner<seqan::Tag > >&, seqan::RazerSOptions<seqan::RazerSSpec<false, false> >&) + 0x4c5 8 [0x76287f] main + 0x22f 9 [0x31e101ed1d] __libc_start_main + 0xfd 10 [0x763039] /Biomarker/ngs/software/razers3/razers3-3.4.0-Linux-x86_64/bin/razers3()

0:00:03.99 Mapping TB2-EM11595_R2.fastq.gz to NUC reference... /home/mi/esiragusa/seqan/include/seqan/basic/basic_exception.h:368 FAILED! (Uncaught exception of type seqan::UnexpectedEnd: Unexpected end of input.)

stack trace: 0 [0xa9d3f7] /Biomarker/ngs/software/razers3/razers3-3.4.0-Linux-x86_64/bin/razers3() 1 [0xab37a6] cxxabiv1::terminate(void (*)()) + 0x6 2 [0xab37d3] /Biomarker/ngs/software/razers3/razers3-3.4.0-Linux-x86_64/bin/razers3() 3 [0xab491e] /Biomarker/ngs/software/razers3/razers3-3.4.0-Linux-x86_64/bin/razers3() 4 [0x76b253] /Biomarker/ngs/software/razers3/razers3-3.4.0-Linux-x8664/bin/razers3() 5 [0x7ce297] void seqan::readRecord<seqan::String<char, seqan::Alloc >, seqan::String<seqan::SimpleType<unsigned char, seqan::Dna5Q>, seqan::Alloc >, seqan::String<char, seqan::Alloc >, seqan::Iter<seqan::VirtualStream<char, seqan::Tag, std::chartraits >, seqan::StreamIterator<seqan::Tag<seqan::Input> > > >(seqan::String<char, seqan::Alloc >&, seqan::String<seqan::SimpleType<unsigned char, seqan::Dna5Q>, seqan::Alloc >&, seqan::String<char, seqan::Alloc >&, seqan::Iter<seqan::VirtualStream<char, seqan::Tag<seqan::Input>, std::chartraits >, seqan::StreamIterator<seqan::Tag<seqan::Input> > >&, seqan::Tag) + 0x77 6 [0x81924c] bool seqan::loadReads<MyFragStoreConfig, seqan::FragmentStoreConfig, seqan::RazerSOptions<seqan::RazerSSpec<false, false> > >(seqan::FragmentStore<MyFragStoreConfig, seqan::FragmentStoreConfig >&, seqan::FormattedFile<seqan::Tag, seqan::Tag, void>&, seqan::RazerSOptions<seqan::RazerSSpec<false, false> >&) + 0x4ec 7 [0xa9c205] int mapReads<seqan::RazerSSpec<false, false> >(seqan::StringSet<seqan::String<char, seqan::Alloc >, seqan::Owner<seqan::Tag > >&, seqan::StringSet<seqan::String<char, seqan::Alloc >, seqan::Owner<seqan::Tag > >&, seqan::RazerSOptions<seqan::RazerSSpec<false, false> >&) + 0x4c5 8 [0x76287f] main + 0x22f 9 [0x31e101ed1d] __libc_start_main + 0xfd 10 [0x763039] /Biomarker/ngs/software/razers3/razers3-3.4.0-Linux-x86_64/bin/razers3()

0:00:04.85 Generating binary hit matrix. Traceback (most recent call last): File "/Biomarker/ngs/software/OptiType/OptiType-master/OptiTypePipeline.py", line 275, in pos, read_details = ht.pysam_to_hdf(bam_paths[0]) File "/Biomarker/ngs/software/OptiType/OptiType-master/hlatyper.py", line 177, in pysam_to_hdf sam = pysam.AlignmentFile(samfile, sam_or_bam) File "pysam/calignmentfile.pyx", line 311, in pysam.calignmentfile.AlignmentFile.cinit (pysam/calignmentfile.c:4929) File "pysam/calignmentfile.pyx", line 480, in pysam.calignmentfile.AlignmentFile._open (pysam/calignmentfile.c:6905) IOError: file /ts19/ngs/studies/ngs_000230/neoantigen_analysis/optitype/TB2-EM11595/2018_03_02_10_16_01_1.bam not found

ghost commented 6 years ago

Looks like OptiType can't take gzipped fastq files. They must be gunzipped first.

andras86 commented 6 years ago

That's strange, because OptiType (or rather the mapper RazerS) can take fastq.gz input, and I've never seen it fail with them. Was the gzipped file surely not corrupted? Did it happen to other gzipped files too?

ghost commented 6 years ago

I tried it on several sets of fastq.gz files and got the above error every time. Once I gunzipped them, everything proceeded normally. That's really the best information I got for you.