DiltheyLab / HLA-LA

Fast HLA type inference from whole-genome data
GNU General Public License v3.0
124 stars 42 forks source link

samtools idxstats bam header not right #46

Closed masen1991 closed 1 year ago

masen1991 commented 4 years ago

Hi, i want to use HLA_LA on nanopore longreads bam file.and i use samtools idxstats on my bam and change the header as existing files. but i still get this bug: Incorrect header for /bio/HLA-LA/HLA-LA/../graphs/PRG_MHC_GRCh38_withIMGT/knownReferences/XH_nanopore_longreads.txt - expect PartialExtraction_Stop, got PartialExtraction_Stop

and i check for many times ,the header shoule be right. so can you help me. maybe it is a silly problem. XH_nanopore_longreads.txt XH.idxstats.txt

Thanks and best, masen

boyangzhao commented 4 years ago

@masen0407 I have to add my reference as well, so just chiming in here. I'm wondering if it's because your file is missing additional tabs in the tab delimited file even if there are no values after the 0. In the instruction, it said The files are tab-separated with header lines and each line shall have the full number of fields (even if they are empty).. I see in your file, not all rows have the same number of tabs (\t), 3\t198295559\t0

should maybe it should be, 3\t198295559\t0\t\t

I'm not the developer here, so just suggesting as idea.

TonyLupara commented 3 years ago

Hi, I have the same problem, but tabulation is right, even if I delete all rows and leave only header, program outputs:

Incorrect header for /home/tony22/anaconda3/envs/hla-env/opt/hla-la/src/../graphs/PRG_MHC_GRCh38_withIMGT/knownReferences/my_ref1.txt at /home/tony22/anaconda3/envs/hla-env/bin/HLA-LA.pl line 255, line 1.

Here is my idxstats and reference specifications my_ref1.txt

idxstats.txt

TonyLupara commented 3 years ago

Have solved my problem. Error was due to incorrect line break type CR LF (for Windows) instead of LF (UNIX).