Commit 4ed025f7 authored by Maria Bernard's avatar Maria Bernard
Browse files

No commit message

No commit message
parent 5b04b0c8
This diff is collapsed.
......@@ -44,6 +44,8 @@ class RADseq (NG6Workflow):
return "RADseq data analysis workflow"
def define_parameters(self, function="process"):
# split_bc
self.add_multiple_parameter_list("pool", "Sequence pool", required = True)
self.add_parameter("id", "Pool uniq identifier", add_to = "pool")
self.add_input_file("read1", "Read 1 fastq file path", required = True, add_to = "pool")
......@@ -53,10 +55,30 @@ class RADseq (NG6Workflow):
self.add_parameter("mismatches", "Max. number of mismatches allowed.",default = 1, type=int)
self.add_parameter("trim_barcode", "Should the barecode be trimmed",default = True, type=bool)
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')
# ustacks
self.add_multiple_parameter("ustacks_opt", "ustacks options",flag="--ustacks-opt")
self.add_parameter("minCov", "stacks minimum coverage", add_to = "ustacks_opt")
self.add_parameter("primary_mismatch", "stacks max mismatch", add_to = "ustacks_opt")
self.add_parameter("secondary_mismatch", "2nd read max mismatch", add_to = "ustacks_opt")
self.add_parameter("uncall_hap", "uncall hap with 2nd read", add_to = "ustacks_opt")
self.add_parameter("removal_algo", "removal cluster correction algo", add_to = "ustacks_opt")
self.add_parameter("deleveraging_algo", "deleveraging cluster correction algo", add_to = "ustacks_opt")
self.add_parameter("max_locus", "max stacks per cluster", add_to = "ustacks_opt")
self.add_parameter("model_type", "model_type : snp, bounded or fixed", add_to = "ustacks_opt")
self.add_parameter("alpha", "alpha threshold for snp or bounded model", add_to = "ustacks_opt")
self.add_parameter("bound_low", "bound low threshold for bounded model", add_to = "ustacks_opt")
self.add_parameter("bound_high", "bound low threshold for bounded model", add_to = "ustacks_opt")
self.add_parameter("bc_err_freq", "barcode error frequency for fixed model", add_to = "ustacks_opt")
# cstacks
self.add_parameter("catalog_mismatches", "How many mismatches allowed between sample to generate the cluster catalog",default = 1, type=int)
# ng6
self.add_parameter("compression", "How should data be compressed once archived (none|gz|bz2)",default = 'gz', choices=['none', 'gz', 'bz2'])
self.add_parameter("databank", "Which databank should be used to seek contamination (as to be nr databank)")
self.add_exclusion_rule('trim_reads2', 'trim_barcode')
def process(self):
......@@ -96,6 +118,38 @@ class RADseq (NG6Workflow):
splitbc = self.add_component("Splitbc", [ fastq_files_1, barcode_files, fastq_files_2, rad, rad_tag, self.mismatches,
self.tag_mismatch, self.trim_barcode, self.trim_reads2])
#ustacks = self.add_component("Ustacks" , [], {"indiv_dic": indivs_by_name, "read1_files" : splitbc.output_read1 , "max_locus" : 3 } )
#cstacks = self.add_component("Cstacks", [ustacks.alleles, ustacks.snps, ustacks.tags, self.args["catalog_mismatches"]])
# creation des listes
samples_id = []
read1_files = []
read2_files = []
# for idx, read1 in enumerate(splitbc.output_read1):
# samples_id.append(idx)
# read1_files.append(read1)
# read2_files.append(splitbc.output_read2[idx])
#
# process_radtag(read1_files,read2_files)
# check non empty and MAJ sample_id
# for idx, read1 in enumerate(process_radtag.output_read_1):
# if empty read1:
# sample_id.pop(idx)
# ustacks = self.add_component("Ustacks", [sample_id,process_radtag.outputread1])
# test
samples_id = []
read1_files = []
for idx, read1 in enumerate(splitbc.output_read1):
samples_id.append(idx)
read1_files.append(read1)
# print samples_id
# print read1_files
ustacks_opt={}
ustacks = self.add_component("Ustacks", [samples_id,read1_files])
#cstacks = self.add_component("Cstacks", [ustacks.alleles, ustacks.snps, ustacks.tags, self.args["catalog_mismatches"]])
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