bmvdgeijn / WASP

WASP: allele-specific pipeline for unbiased read mapping and molecular QTL discovery
Apache License 2.0
103 stars 51 forks source link

filter_remapped_reads.py with bams created by HISAT2/ other mappers than Bowtie2 #114

Open azurillandfriend opened 2 years ago

azurillandfriend commented 2 years ago

I think this may be an error in the format of the read names to do with using HISAT2 rather than Bowtie2 for read mapping.

I used HISAT2 for both the initial mapping and the remapping of the reads in the sort.to.remap.bam file output by find_intersecting_snps.py.

find_intersecting_snps.py. seemed to run without errors and generated all the expected output files. I took the .fq1.gz and .fq2.gz output from find_intersecting_snps.py and used as input to HISAT2 to remap the reads.

I get the following error message when attempting to run filter_remapped_reads.py: error: Traceback (most recent call last): File "/home/dyern/lstm_scratch/WASP/mapping/filter_remapped_reads.py", line 307, in main(options.to_remap_bam, options.remap_bam, options.keep_bam) File "/home/dyern/lstm_scratch/WASP/mapping/filter_remapped_reads.py", line 299, in main keep_reads, bad_reads, cigar_strings = filter_reads(remap_bam) File "/home/dyern/lstm_scratch/WASP/mapping/filter_remapped_reads.py", line 102, in filter_reads raise ValueError("expected read names to be formatted " ValueError: expected read names to be formatted like ... but got HISEQ:29:C3VGMACXX:5:2315:9066:5340

I'm now trying to remap everythng using Bowtie2, but ideally would like to continue with HISAT2 - is this a problem with everything output from HISAT2 having wrongly formatted read names or just my mistake in how a ran it?

gmcvicker commented 2 years ago

The HiSAT2 read naming may be an issue, but I am not entirely sure. In any case, I would recommend to use a different aligner if possible. I seem to recall from talking to @bmvdgeijn that there may be some other issues with using HISAT with WASP, but I don't remember exactly what they were. I would suggest using BWA or Bowtie2 instead.

azurillandfriend commented 2 years ago

Thanks, I will try it with Bowtie2 as per the tutorial. It would be interesting to know how what the other issue is as @sanjaynagi recommended HISAT2 perticularly to me as being superior to Bowtie2.