<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.anunna.wur.nl/index.php?action=history&amp;feed=atom&amp;title=Command_line_tricks_for_manipulating_fastq</id>
	<title>Command line tricks for manipulating fastq - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.anunna.wur.nl/index.php?action=history&amp;feed=atom&amp;title=Command_line_tricks_for_manipulating_fastq"/>
	<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Command_line_tricks_for_manipulating_fastq&amp;action=history"/>
	<updated>2026-04-18T17:38:29Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Command_line_tricks_for_manipulating_fastq&amp;diff=816&amp;oldid=prev</id>
		<title>Megen002: Created page with &quot;== Extracting a sequence based on read name ==  &lt;source lang=&#039;bash&#039;&gt; gunzip -c reads.fq.gz | sed -n &#039;/readname/,+3 p&#039; &lt;/source&gt;  == From BAM/SAM to fastq ==  &lt;source lang=&#039;bas...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Command_line_tricks_for_manipulating_fastq&amp;diff=816&amp;oldid=prev"/>
		<updated>2013-12-08T11:25:44Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Extracting a sequence based on read name ==  &amp;lt;source lang=&amp;#039;bash&amp;#039;&amp;gt; gunzip -c reads.fq.gz | sed -n &amp;#039;/readname/,+3 p&amp;#039; &amp;lt;/source&amp;gt;  == From BAM/SAM to fastq ==  &amp;lt;source lang=&amp;#039;bas...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Extracting a sequence based on read name ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;#039;bash&amp;#039;&amp;gt;&lt;br /&gt;
gunzip -c reads.fq.gz | sed -n &amp;#039;/readname/,+3 p&amp;#039;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== From BAM/SAM to fastq ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;#039;bash&amp;#039;&amp;gt;&lt;br /&gt;
samtools view bamfile.bam | grep -v &amp;#039;^@&amp;#039; | awk &amp;#039;{print &amp;quot;@&amp;quot;$1&amp;quot;\n&amp;quot;$10&amp;quot;\n+\n&amp;quot;$11}&amp;#039;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== From fastq to fasta ==&lt;br /&gt;
&amp;lt;source lang=&amp;#039;bash&amp;#039;&amp;gt;&lt;br /&gt;
gunzip -c fastqfile.fq.gz | sed &amp;#039;s/^@/&amp;gt;/&amp;#039; | awk &amp;#039;{print;getline;print;getline;getline}&amp;#039; &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Counting number of bases in a fastq file ==&lt;br /&gt;
&amp;lt;source lang=&amp;#039;bash&amp;#039;&amp;gt;&lt;br /&gt;
gunzip -c fastqfile.fq.gz | awk &amp;#039;{;getline;print;getline;getline}&amp;#039; | wc&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Megen002</name></author>
	</entry>
</feed>