Commit 7c87e101 authored by Gerald Salin's avatar Gerald Salin
Browse files

Merge branch 'markduplicates' into 'master'

Modification for duplicate search and visualisation ok

See merge request !33
parents 00b365f2 2efbe754
......@@ -41,7 +41,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{elseif $split_param[0] == "READ_NAME_REGEX"}
<li class="parameter">Regular expression that can be used to extract three variables : tile/region, x coordinate and y coordinate ({$split_param[0]}={$split_param[1]}). These values are used to estimate the rate of optical duplication.</li>
{elseif $split_param[0] == "OPTICAL_DUPLICATE_PIXEL_DISTANCE"}
<li class="parameter">The maximum offset between two duplicte clusters in order to consider them optical duplicates is {$split_param[1]} ({$split_param[0]}={$split_param[1]}).</li>
<li class="parameter">The maximum offset between two duplicate clusters in order to consider them optical duplicates is {$split_param[1]} ({$split_param[0]}={$split_param[1]}).</li>
{/if}
{/if}
{/foreach}
......@@ -71,7 +71,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<th class="numeric-sort" style="vertical-align:Middle"><center>Singletons</center></th>
<th class="numeric-sort" style="vertical-align:Middle"><center>Mate mapped on a different chr</center></th>
<th class="numeric-sort" style="vertical-align:Middle"><center>Supplementary</center></th>
<th class="numeric-sort" style="vertical-align:Middle"><center>Duplicated</center></th>
<th class="numeric-sort" style="vertical-align:Middle"><center>Nb read duplicated</center></th>
<th class="numeric-sort" style="vertical-align:Middle"><center>Read pair duplicates</center></th>
<th class="numeric-sort" style="vertical-align:Middle"><center>Read pair optical duplicates</center></th>
......@@ -122,7 +122,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<td>-</td>
<td>-</td>
{else}
<td>{($sample_results["default"].pairDuplicates*2 + $sample_results["default"].unpairDuplicates)|number_format:0:' ':' '}</td>
<td>{($sample_results["default"].pairDuplicates*2 + $sample_results["default"].unpairDuplicates)|number_format:0:' ':' '} ({$sample_results["default"].percentDuplication}*100%)</td>
<td>{$sample_results["default"].pairDuplicates|number_format:0:' ':' '}</td>
<td>{$sample_results["default"].pairOpticalDuplicates|number_format:0:' ':' '}</td>
{/if}
......
......@@ -43,7 +43,7 @@ class AlignmentStats (Analysis):
self.add_parameter("assume_sorted", "assume_sorted", default=assume_sorted, type=bool)
self.add_parameter("validation_stringency", "validation_stringency", default=validation_stringency)
self.add_parameter("max_file_handles", "max_file_handles", default=max_file_handles, type=int)
self.add_parameter("sorting_collection_size_ratio", "sorting_collection_size_ratio", default=max_file_handles, type=float)
self.add_parameter("sorting_collection_size_ratio", "sorting_collection_size_ratio", default=sorting_collection_size_ratio, type=float)
self.add_parameter("archive_name", "archive_name", default=archive_name)
self.memory = '4G'
if self.get_memory() != None :
......@@ -136,6 +136,7 @@ class AlignmentStats (Analysis):
self._add_result_element(sample, "pairDuplicates", dupl_info["Unknown Library"]["READ_PAIR_DUPLICATES"])
self._add_result_element(sample, "unpairDuplicates", dupl_info["Unknown Library"]["UNPAIRED_READ_DUPLICATES"])
self._add_result_element(sample, "pairOpticalDuplicates", dupl_info["Unknown Library"]["READ_PAIR_OPTICAL_DUPLICATES"])
self._add_result_element(sample, "percentDuplication", dupl_info["Unknown Library"]["PERCENT_DUPLICATION"])
# Finaly create and add the archive to the analyse
......@@ -156,7 +157,7 @@ class AlignmentStats (Analysis):
xmx="-Xmx"+self.memory.lower()
if self.search_dupl:
self.tmp_bam = self.get_outputs('{basename_woext}_noDupl.bam', self.bam_files)
self.add_shell_execution(self.get_exec_path("javaPICARD")+ " "+ xmx +"-jar " + self.get_exec_path("Picard") + " MarkDuplicates INPUT=$1 METRICS_FILE=$2 OUTPUT=$3" + self.duplication_options + " 2> $4",
self.add_shell_execution(self.get_exec_path("javaPICARD")+ " "+ xmx +" -jar " + self.get_exec_path("Picard") + " MarkDuplicates INPUT=$1 METRICS_FILE=$2 OUTPUT=$3" + self.duplication_options + " 2> $4",
cmd_format='{EXE} {IN} {OUT}', map=True,
inputs=self.bam_files, outputs=[self.duplication_files, self.tmp_bam, self.dupl_stderrs])
......
......@@ -64,7 +64,7 @@ class IlluminaQualityCheck (CasavaNG6Workflow):
bwa = self.add_component("BWA", [indexed_ref, filtered_read1_files, filtered_read2_files, sample_lane_prefixes, "mem", not self.delete_bam], parent = fastqilluminafilter)
# make some statistic on the alignement
alignmentstats = self.add_component("AlignmentStats", [bwa.bam_files, self.is_paired_end(), False], parent = bwa)
alignmentstats = self.add_component("AlignmentStats", [bwa.bam_files, self.is_paired_end(), True], parent = bwa)
if self.is_paired_end():
# process insert sizes
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment