Closed matteodelucchi closed 5 years ago
Hi @matteodelucchi ,
From your BAM header, it looks like you mapped the reads to GRCh38. But the FASTA file and STR reference file you're feeding in are for hg19.
As a result, htslib, an internal library used by HipSTR, crashes while trying to access a region that's not defined.
To fix this issue, you should use the correct GRCh38 FASTA file and STR reference file, the latter of which is available here.
Best, Thomas
Oh, yes! My bad! Thanks for the hint!
However, with the reference file you linked (GRCh38.hipstr_reference.bed ) and this GRCh38 fasta it gave me this error (log-file):
Detected 1 BAM/CRAM files
BAMs/CRAMs contain unique read group IDs for 1 unique libraries and 1 unique samples
Reading region file /some/path/GRCh38.hipstr_reference.bed
Region file contains 1638945 regions
ERROR: No sequence for chromosome 1 found in the FASTA file
Please ensure that the chromosome names in your region BED file match those in you FASTA file
NOTE: Found chromosome chr1 in the FASTA, but not chromosome 1
Which i could resolve using the hg38.hipstr_reference.bed instead.
In case any one else will experience a similar issue in the future, the difference seems to be mostly in the labeling of the chromosomes:
$ head -n 3 hg38.hipstr_reference.bed
chr1 10001 10468 6 78 Human_STR_1 AACCCT
chr1 16717 16744 3 9.33333 Human_STR_2 GGT
chr1 26454 26465 2 6 Human_STR_3 GT
$ head -n 3 GRCh38.hipstr_reference.bed
1 10001 10468 6 78 Human_STR_1 AACCCT
1 16717 16744 3 9.33333 Human_STR_2 GGT
1 26454 26465 2 6 Human_STR_3 GT
Background info: I work with RNAseq data. After mapping the read data I filtered them with
samtools view -q 10 -b test.bam > test.aligned_reads.q10.bam
followed by sorting and indexing. Which then results in the filetest2.1.my_sorted.bam
(andtest2.1.my_sorted.bam.bai
) with the following header:actual problem: If I input this file (just for testing purposes) in HipSTR, I get this error:
First, I thought it might be an issue with the .bam file. However the
FastaReader
let me go away from that idea... The HipSTR-tutorial works perfectly and I use here the same files forall_chroms.fa
andhg19.hipstr_reference.bed
as in the tutorial.