Entering edit mode
6.5 years ago
elena.syp
•
0
Hi! I have annotated some clustered genes in a very fragmented genome assembly based on Illumina reads. I want to study their synteny (impossible in the assembly I have) and I have a lot of nanopore reads as well. I had aligned the nanopore reads to the Illumina annotated-genes using BWA and I have now an alignment file. I now want to get the COMPLETE SEQUENCE of the reads aligning to my reference (so I can make a local assembly of those reads and hopefully get the synteny) and NOT ONLY THE PART OF THE READS THAT ALIGN TO THE REFERENCE. Is it possible to do that? How can I do it? Thanks a lot!
samtools view | cut
?? #oramimissingsomething ?As per Pierre, you can just use
samtools view -b -f 0x2 MyBAM.bam
in order to extract just the reads that have aligned successfully to your genome (assuming paired-end). You can then use thecut
command in combination in order to pull out information relating to read positions if you want to group them into specific loci prior to performing local assembly.Another way to extract aligned reads over a defined genomic region is, for example: