Commit ae2f88ff authored by Maria Bernard's avatar Maria Bernard
Browse files

add dereplicate option for optional fastuniq execution

parent b8d1f26a
......@@ -57,6 +57,9 @@ class RADseq (NG6Workflow):
self.add_parameter("trim_reads2", " Shoud the read 2 be trimmed to have the same length as the read1",default = False, type=bool)
self.add_exclusion_rule('trim_reads2', 'trim_barcode')
#fastuniq
self.add_parameter("dereplicate", "Should we remove PCR duplcat. Only for classiq paired end RADSeq protocol",default = False, type=bool)
# ustacks
self.add_parameter("min_cov", "stacks minimum coverage", type=int)
self.add_parameter("primary_mismatch", "stacks max mismatch", type=int)
......@@ -114,10 +117,16 @@ class RADseq (NG6Workflow):
self.tag_mismatch, self.trim_barcode, self.trim_reads2])
# FASTUNIQ
fastuniq = self.add_component("Fastuniq", [splitbc.output_read1,splitbc.output_read2])
read1_list=splitbc.output_read1
read2_list=splitbc.output_read2
if self.dereplicate :
fastuniq = self.add_component("Fastuniq", [splitbc.output_read1,splitbc.output_read2])
read1_list=fastuniq.out_read1_files
read2_list=fastuniq.out_read2_files
#
# # PROCESS_RADTAG
# process_radtag(fastuniq.out_read1_files,fastuniq.out_read2_files)
# process_radtag(read1_list,read2_list)
#
# # USTACKS
# # creation des listes pour conserver l'ordre entre read1 read2 et sample id
......@@ -132,11 +141,9 @@ class RADseq (NG6Workflow):
# samples_id.append(idx)
#
# test a supprimer
read1_files = fastuniq.out_read1_files
samples_id = range(0,len(read1_files))
samples_id = range(0,len(read1_list))
ustacks_opt={"samples_id":samples_id,"read1_files":read1_files}
ustacks_opt={"samples_id":samples_id,"read1_files":read1_list}
if self.min_cov :
ustacks_opt["min_cov"] = self.min_cov
......
......@@ -19,6 +19,7 @@
# globals
--enzyme
sbfI
--dereplicate
# sample description
--sample
......
......@@ -19,6 +19,7 @@
# globals
--enzyme
sbfI
--dereplicate
# sample description
--sample
......
Supports Markdown
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