-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Hi,
FADU is a great tool, especially for measuring transcription of operons. Unfortunately, I've run into a couple issues with FADU's compatibility with other common tools, such as bwa mem, bowtie2, and samtools.
First, from what I can tell, FADU only uses the optional "NH" sam attribute to detect multi-mapped reads. Neither bowtie2 nor bwa mem annotate alignments with NH. FADU does not return an error/ warning message when run on alignments lacking the NH attribute. Rather, it appears to just treat all reads as individually mapped. It might be helpful to include a warning, or even a script for annotating .bam files with the NH attribute.
Second, FADU will frequently fail on .bam files that have been processed with samtools view. I'm not sure why this is, but it occurs for roughly half of my samples. The error always occurs after the info message:
[ Info: Now finding overlaps between alignment and annotation records...
And the stack trace always ends with:
Stacktrace:
[1] getindex
@ ./array.jl:861 [inlined]
[2] virtualoffset(stream::BGZFStreams.BGZFStream{IOStream})
@ BGZFStreams ~/.julia/packages/BGZFStreams/qApsr/src/bgzfstream.jl:156
[3] iterate(iter::OverlapIterator{IOStream}, state::XAM.BAM.OverlapIteratorState)
@ Main /gsap/archive-bacterial/Users/Mark/conda/envs/fadu/bin/FADU/alignment_overlaps.jl:76
[4] iterate(iter::OverlapIterator{IOStream})
@ Main /gsap/archive-bacterial/Users/Mark/conda/envs/fadu/bin/FADU/alignment_overlaps.jl:63
[5] process_feature_overlaps!(feat_overlaps::Dict{String, FeatureOverlap}, multimapped_dict::Dict{String, StructArray}, reader::XAM.BAM.Reader{IOStream}, feature::GFF3.Record, args::Dict{String, Any})
I've tried messing around with the samtools view parameters but still consistently get the error. It always occurs for some samples, and never for others. FADU runs without error on the original, pre samtools view alignment file, or .bam files created with pysam using the original alignment file as template.