Skip to main content
edited body
Source Link
terdon
  • 10.6k
  • 5
  • 23
  • 48

What Devon said. Alternatively, you could also just convert the bam to sam and then look for lines where the 3rd field (the reference the sequence is aligned to) is what you want:

samtools view pseudoalignments.bam | awk '$3=="ENST00000367969.8"'

But really, it's far better to sort and index the file as Devon suggested toso you can use dedicated tools in future.

What Devon said. Alternatively, you could also just convert the bam to sam and then look for lines where the 3rd field (the reference the sequence is aligned to) is what you want:

samtools view pseudoalignments.bam | awk '$3=="ENST00000367969.8"'

But really, it's far better to sort and index the file as Devon suggested to you can use dedicated tools in future.

What Devon said. Alternatively, you could also just convert the bam to sam and then look for lines where the 3rd field (the reference the sequence is aligned to) is what you want:

samtools view pseudoalignments.bam | awk '$3=="ENST00000367969.8"'

But really, it's far better to sort and index the file as Devon suggested so you can use dedicated tools in future.

Source Link
terdon
  • 10.6k
  • 5
  • 23
  • 48

What Devon said. Alternatively, you could also just convert the bam to sam and then look for lines where the 3rd field (the reference the sequence is aligned to) is what you want:

samtools view pseudoalignments.bam | awk '$3=="ENST00000367969.8"'

But really, it's far better to sort and index the file as Devon suggested to you can use dedicated tools in future.