extract nanopore reads from the bam/sam file
Hi, After mapping the nanopore reads on the reference Genome, I want to extract raw reads from the bam/sam file. Can someone help me here? Thank you in advance!!
genome
alignment
next-gen
• 4,757 views
•
link
written
by
kanshenglong •
0 answers
No answers yet.
Log in to answer this question.
More posts like this
-
Extracting regions around sites in VCF file and writing them as fasta sequences/files
written by Aiswarya •Hai, I am trying to extract 50 base pair sequence before and 50 bp after the coordinates present in my VCF files and write them …
-
How to calculate the depth of nanopore reads in IGV
written by kirankumareripogu •Hi, I wanted to see what is the depth of the nanopore reads in IGV. I used bwa (Burrow-Wheeler Aligner) to map the raw nanopore …
-
Extarct specific bases from BAM/SAM files
written by AnkitHi everyone, I want to extract a specific base (based on position lists) from my reads from bam/sam file. If any specific tools / package …
-
IGV sequence name error .sam file
written by A_heath •Hi all, I've mapped raw reads obtained from Nanopore Sequencing (fastq) to a reference genome (fasta) using Graphmap2. The output is a .sam file that …
-
How to extract only the alignments to the chloroplast reference genome of a sam file
written by macielrodriguez2 •Hi! I’m pretty new to bioinformatics in linux :D My lab received paired-end reads (151 bp) of WGS of purple corn and we mapped them …
-
extracting reads from sam/bam file
written by KVC_bioinfoHello All, I have sam and bam file from alignment of reads (single-end) obtained from Oxford nanopore technology(human genome as a reference) I want to …
-
Extract reads from fasta file (specific read_names)and make a new fasta file
written by KVC_bioinfoHello all, I have a huge fasta file. I need to extract few reads from the original fasta file. I have the read names which …
-
samtools view for selecting the unmapped reads
written by zizigoluHi there, I used Interactive Genome Viewer (IGV), to visualization of produced sam file from bowtie2, after loading of sorted-sam in IGV..**from where and how …
-
Long read-alignment + variant calling
written by CoryzaHi, I have a set of ~ 50 corrected PacBio reads (~2KB) which I want to map against a reference genome. These 50 reads should …
-
Filter Bam Or Sam Files / Only Allow A Specific Mutation
written by Philipp •<p>I will process a bam or sam file that it only contains reads with a specific type of Mutations (for example the mismatch is T …
samtools fastqshould work. See inline help for options.That said if you did the mapping yourself don't you have the original files? Or are you looking to get only mapped/unmapped reads?
Yes. I did this mapping by myself. And I am looking forward to get only mapped/unmapped reads. I mean to filter the nanopore reads which is identity with plastid genome by graphmap and samtools. So I can prevent from nuclear contamination when I assemble plastid genome. Thanks for your help!
This information should have been in the original posting.
Take a look at: How To Filter Mapped Reads With Samtools
What puzzles me is the command of filtering illumina reads same as nanopore reads? Thanks!
Fastq format is a standard. Fastq headers will be different for illumina and nanopore.
If your reads are soft clipped (or not fully present in your alignment file) then you may want to gather just the nanopore headers of the two kinds and then retrieve the full reads from original data file.
Thanks for your useful answer. And would you like to teach me to gather the headers of the mapped reads and retrieve the full reads from original data file.
Filter the reads using the strategy above and then you could extract the read headers (will start with
^@somethingsogrepfor that pattern) and put them into a new file. Use the answer here to pull out those reads from original file: A: Extracting specific sequences from FASTQ using SeqtkThanks for your help!!