<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://teaching.healthtech.dtu.dk/22126/index.php?action=history&amp;feed=atom&amp;title=Postprocess_exercise_answers</id>
	<title>Postprocess exercise answers - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://teaching.healthtech.dtu.dk/22126/index.php?action=history&amp;feed=atom&amp;title=Postprocess_exercise_answers"/>
	<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Postprocess_exercise_answers&amp;action=history"/>
	<updated>2026-05-15T14:50:58Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Postprocess_exercise_answers&amp;diff=229&amp;oldid=prev</id>
		<title>Mick at 13:58, 20 November 2025</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Postprocess_exercise_answers&amp;diff=229&amp;oldid=prev"/>
		<updated>2025-11-20T13:58:49Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://teaching.healthtech.dtu.dk/22126/index.php?title=Postprocess_exercise_answers&amp;amp;diff=229&amp;amp;oldid=26&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Mick</name></author>
	</entry>
	<entry>
		<id>https://teaching.healthtech.dtu.dk/22126/index.php?title=Postprocess_exercise_answers&amp;diff=26&amp;oldid=prev</id>
		<title>WikiSysop: Created page with &quot;&#039;&#039;&#039;Q1&#039;&#039;&#039; Running:  &lt;pre&gt; java -jar /home/ctools/picard_2.23.8/picard.jar MarkDuplicates -I /home/projects/22126_NGS/exercises/dupremoval/ERR016028_chr20_sort.bam -M  ERR016028_chr20_sort_markdup.metrics.txt -O ERR016028_chr20_sort_markdup.bam &lt;/pre&gt;  The log should state:   &lt;pre&gt; Marking 9798 records as duplicates. &lt;/pre&gt; Please note that this is very low but that is because we have very little data so that it runs faster.   &#039;&#039;&#039;Q2&#039;&#039;&#039;  They do not have the same sequence:...&quot;</title>
		<link rel="alternate" type="text/html" href="https://teaching.healthtech.dtu.dk/22126/index.php?title=Postprocess_exercise_answers&amp;diff=26&amp;oldid=prev"/>
		<updated>2024-03-19T15:29:34Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;Q1&amp;#039;&amp;#039;&amp;#039; Running:  &amp;lt;pre&amp;gt; java -jar /home/ctools/picard_2.23.8/picard.jar MarkDuplicates -I /home/projects/22126_NGS/exercises/dupremoval/ERR016028_chr20_sort.bam -M  ERR016028_chr20_sort_markdup.metrics.txt -O ERR016028_chr20_sort_markdup.bam &amp;lt;/pre&amp;gt;  The log should state:   &amp;lt;pre&amp;gt; Marking 9798 records as duplicates. &amp;lt;/pre&amp;gt; Please note that this is very low but that is because we have very little data so that it runs faster.   &amp;#039;&amp;#039;&amp;#039;Q2&amp;#039;&amp;#039;&amp;#039;  They do not have the same sequence:...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Q1&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Running:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
java -jar /home/ctools/picard_2.23.8/picard.jar MarkDuplicates -I /home/projects/22126_NGS/exercises/dupremoval/ERR016028_chr20_sort.bam -M  ERR016028_chr20_sort_markdup.metrics.txt -O ERR016028_chr20_sort_markdup.bam&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The log should state:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Marking 9798 records as duplicates.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Please note that this is very low but that is because we have very little data so that it runs faster.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Q2&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
They do not have the same sequence:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ERR016028.5947720  ACATGTGGCTAATTTTTTTTACTGTTGTGGAGAAAGGAGGAGGGAGAGGGGAGTCTCATTATCTTGCCCAGGCTAG&lt;br /&gt;
ERR016028.18808080 ACATGTGGCTAATTTTTTTTACTGTTGTGGAGAAAGGAGGAGGGAGAGGGGAGTCNCATTATCTTGCCCAGGCTAG&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
notice &amp;quot;TCTCA&amp;quot; vs &amp;quot;TCNCA&amp;quot; but they both have the same starting coordinate (45996739).&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Q3&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
ERR016028.18808080 is the read marked as duplicate. It is the read whose flag (2nd field) changed from 163 to 1187, which corresponds to a duplicate (see [https://broadinstitute.github.io/picard/explain-flags.html https://broadinstitute.github.io/picard/explain-flags.html]).&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Q4&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The correct command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
samtools merge &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you choose:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
samtools cat &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It will merely concatenate the files meaning that they will be file1, file2, file3.. It will not necessarily be sorted.&lt;br /&gt;
&lt;br /&gt;
The full command should look something like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
samtools merge -c --write-index HG00418_chr20_sort_markdup.bam   ERR016028_chr20_sort_markdup.bam  /home/projects/22126_NGS/exercises/dupremoval/ERR016025_chr20_sort_markdup.bam &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Q5&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 &lt;br /&gt;
It is &amp;#039;&amp;#039;&amp;#039;RG&amp;#039;&amp;#039;&amp;#039; which stands for read group. You will see them at the end of reads:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	RG:Z:ERR016025&lt;br /&gt;
	RG:Z:ERR016028&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it was &amp;#039;&amp;#039;&amp;#039;RG:Z:ERR016025&amp;#039;&amp;#039;&amp;#039; it was from the file that was stored, &amp;#039;&amp;#039;&amp;#039;RG:Z:ERR016028&amp;#039;&amp;#039;&amp;#039; was from the file you generated.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Q6&amp;#039;&amp;#039;&amp;#039; multiplexing&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Q7&amp;#039;&amp;#039;&amp;#039; demultiplexing&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
</feed>