DiltheyLab / HLA-LA

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

[Help needed] Unable to process a chr6-only BAM file #107

Open kristineding98 opened 1 year ago

kristineding98 commented 1 year ago

I mapped my data to hg38 (reference is whole genome) and truncated a sub-dataset of only chr6 entries with following comment:

samtools view -b -h sample_sorted.bam chr6 > sample_sorted_chr6.bam

When feeding the only-chr6 BAM file into the HLA-LA, I got the following error code after the 'Extract unmapped reads... ' checkpoint:

Using /opt/conda/envs/hla-la/opt/hla-la/src/additionalReferences/PRG_MHC_GRCh38_withIMGT/Illumina_B38.txt as reference file.
Extract reads from 1 regions...
Extract unmapped reads...
[main_samview] fail to read the header from "-".
Extraction command /opt/conda/envs/hla-la/bin/samtools view -@ 6  sample_sorted_chr6.bam '*' | awk '{if ($3 == "*") print $0}' | /opt/conda/envs/hla-la/bin/samtools view -bo /users/ding/hla/clean/sample_chr6/extraction_unmapped.bam - failed at /opt/conda/envs/hla-la/bin/HLA-LA.pl line 420.

Issue seems to be similar to https://github.com/DiltheyLab/HLA-LA/issues/88, but still different.

Any help would be appreciated.

kristineding98 commented 1 year ago

My initiative for doing this truncation is that though HLA-LA is working fine with the full BAM file before chr6 truncation, the processing time was long.