<?xml version='1.0'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:atom="http://www.w3.org/2005/Atom" >
<channel>
	<title><![CDATA[BOL: Extract the mapped and unmapped reads !]]></title>
	<link>https://bioinformaticsonline.com/snippets/view/43965/extract-the-mapped-and-unmapped-reads?</link>
	<atom:link href="https://bioinformaticsonline.com/snippets/view/43965/extract-the-mapped-and-unmapped-reads?" rel="self" type="application/rss+xml" />
	<description><![CDATA[]]></description>
	
	<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/43965/extract-the-mapped-and-unmapped-reads</guid>
	<pubDate>Fri, 23 Sep 2022 06:18:33 -0500</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/43965/extract-the-mapped-and-unmapped-reads</link>
	<title><![CDATA[Extract the mapped and unmapped reads !]]></title>
	<description><![CDATA[<code>PROCESSORS=20

#Single_End_Layout:
samtools view --threads $PROCESSORS -b -F 4 in.bam &gt; mapped.bam
samtools view --threads $PROCESSORS -b -f 4 in.bam &gt; unmapped.bam

#Paired_End_Layout
samtools view --threads $PROCESSORS -b -f 2 in.bam &gt; mapped.bam
samtools view --threads $PROCESSORS -b -F 2 in.bam &gt; unmapped.bam</code>]]></description>
	<dc:creator>Abhi</dc:creator>
</item>

</channel>
</rss>