MikeAxtell / ShortStack

ShortStack: Comprehensive annotation and quantification of small RNA genes
MIT License
88 stars 29 forks source link

Allow bowtie2 .bam file as --readfile option without realignment #74

Closed zajakin closed 1 year ago

zajakin commented 6 years ago

Allow bowtie2 .bam file as --readfile option without realignment. Usage: ShortStack.pl --readfile myBowtie2file.bam --genomefile hg38.fa --inbam

MikeAxtell commented 6 years ago

Hi Pawel, thanks for the pull request!

I see your intent here and it make sense --passing in a bamfile and sucking the read out to re-align them.

I see some issues to discuss though:

  1. README and usage statement would need to be updated to discuss the new usage.
  2. The SEQ is not required to be stored per the SAM spec. So it's possible that the user's input BAM file would in fact not have the sequences to extract. There should probably be some error handling for that.
  3. Related to point two above: This is perhaps a samtools question, but how does samtools view deal with supplementary alignments, will it only output one read? If not, seems like some error handling for that would also be in order.