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

No commit message

No commit message
parent 21966517
......@@ -33,8 +33,8 @@ def wrap_cstacks(exec_path, mismatch, batch_id, out_dir, inputs_tags_list, outpu
cmd.append("-s")
cmd.append(os.path.abspath(i.strip()).replace(".tags"," ").split(" ")[0])
p = Popen(cmd, stdout=PIPE, stderr=PIPE)
stdout, stderr = p.communicate()
p = Popen(cmd, stderr=PIPE)
stderr = p.communicate()[1]
# write down the stderr
stdeh = open(stderr_path, "w")
stdeh.write(stderr)
......@@ -117,10 +117,10 @@ class Cstacks (Analysis):
self.__parse_tags(self.catalog_tags,tot_sample,locus_dict, self.samples_id, self.population_list)
else :
self.__parse_tags(self.catalog_tags,tot_sample,locus_dict)
print "tot_locus,len(locus_dict[singleton]), len(locus_dict[multi_sample]), len(locus_dict[half_sample]), \
len(locus_dict[all_sample])"
print tot_locus,len(locus_dict["singleton"]), len(locus_dict["multi_sample"]), len(locus_dict["half_sample"]), \
len(locus_dict["all_sample"])
# print "tot_locus,len(locus_dict[singleton]), len(locus_dict[multi_sample]), len(locus_dict[half_sample]), \
# len(locus_dict[all_sample])"
# print tot_locus,len(locus_dict["singleton"]), len(locus_dict["multi_sample"]), len(locus_dict["half_sample"]), \
# len(locus_dict["all_sample"])
self._add_result_element("cstacks_tags", "nb_locus", tot_locus)
self._add_result_element("cstacks_tags", "locus_singleton", len(locus_dict["singleton"]))
......@@ -141,10 +141,10 @@ class Cstacks (Analysis):
min_var = np.min(snp_dict["nb_snp"]["clust_var"])
max_var = np.max(snp_dict["nb_snp"]["clust_var"])
print "nb_clust_var, tot_var, mean_var, min_var, max_var, snp_dict[nb_snp][singleton], snp_dict[nb_snp][multi_sample],\
snp_dict[nb_snp][half_sample], snp_dict[nb_snp][all_sample] "
print nb_clust_var, tot_var, mean_var, min_var, max_var, snp_dict["nb_snp"]["singleton"], snp_dict["nb_snp"]["multi_sample"],\
snp_dict["nb_snp"]["half_sample"], snp_dict["nb_snp"]["all_sample"]
# print "nb_clust_var, tot_var, mean_var, min_var, max_var, snp_dict[nb_snp][singleton], snp_dict[nb_snp][multi_sample],\
# snp_dict[nb_snp][half_sample], snp_dict[nb_snp][all_sample] "
# print nb_clust_var, tot_var, mean_var, min_var, max_var, snp_dict["nb_snp"]["singleton"], snp_dict["nb_snp"]["multi_sample"],\
# snp_dict["nb_snp"]["half_sample"], snp_dict["nb_snp"]["all_sample"]
self._add_result_element("cstacks_snps", "nb_locus_var", nb_clust_var)
self._add_result_element("cstacks_snps", "tot_var", tot_var)
......@@ -158,10 +158,10 @@ class Cstacks (Analysis):
# ==> courbe de distribution du nombre de cluster en fonction du nombre de variant par cluster
print "snp_dict[nb_hap][1_hap],snp_dict[nb_hap][2_hap], snp_dict[nb_hap][3_hap], snp_dict[nb_hap][4_hap], snp_dict[nb_hap][sup5_hap],\
snp_dict[nb_hap][sup10_hap], snp_dict[nb_hap][max_hap]"
print snp_dict["nb_hap"]["1_hap"], snp_dict["nb_hap"]["2_hap"], snp_dict["nb_hap"]["3_hap"], snp_dict["nb_hap"]["4_hap"], snp_dict["nb_hap"]["sup5_hap"],\
snp_dict["nb_hap"]["sup10_hap"], snp_dict["nb_hap"]["max_hap"]
# print "snp_dict[nb_hap][1_hap],snp_dict[nb_hap][2_hap], snp_dict[nb_hap][3_hap], snp_dict[nb_hap][4_hap], snp_dict[nb_hap][sup5_hap],\
# snp_dict[nb_hap][sup10_hap], snp_dict[nb_hap][max_hap]"
# print snp_dict["nb_hap"]["1_hap"], snp_dict["nb_hap"]["2_hap"], snp_dict["nb_hap"]["3_hap"], snp_dict["nb_hap"]["4_hap"], snp_dict["nb_hap"]["sup5_hap"],\
# snp_dict["nb_hap"]["sup10_hap"], snp_dict["nb_hap"]["max_hap"]
self._add_result_element("cstacks_alleles", "locus_var_1hap", snp_dict["nb_hap"]["1_hap"])
self._add_result_element("cstacks_alleles", "locus_var_2hap", snp_dict["nb_hap"]["2_hap"])
self._add_result_element("cstacks_alleles", "locus_var_3_hap", snp_dict["nb_hap"]["3_hap"])
......
......@@ -153,7 +153,6 @@ class RADseq (NG6Workflow):
if self.max_locus :
ustacks_opt["max_locus"] = self.max_locus
# print ustacks_opt
ustacks = self.add_component("Ustacks", [],ustacks_opt)
# CSTACKS
......
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