comparison scripts/S02b_study_seq_composition_nuc.py @ 9:04a9ada73cc4 draft

planemo upload for repository htpps://github.com/abims-sbr/adaptearch commit f1ba8d136e0129f3e8435b25a95f70f697d51464-dirty
author abims-sbr
date Tue, 03 Jul 2018 10:55:46 -0400
parents f1e24200e5ae
children
comparison
equal deleted inserted replaced
8:705a7bf4c311 9:04a9ada73cc4
93 Path_IN_loci_NUC = "./IN_NUC" 93 Path_IN_loci_NUC = "./IN_NUC"
94 outpath= "./OUT" 94 outpath= "./OUT"
95 os.makedirs(Path_IN_loci_NUC) 95 os.makedirs(Path_IN_loci_NUC)
96 os.makedirs(outpath) 96 os.makedirs(outpath)
97 97
98 infiles = str.split(sys.argv[1], ",") 98 infiles = []
99 with open(sys.argv[2], 'r') as f:
100 for line in f.readlines():
101 infiles.append(line.strip('\n'))
102
103 #infiles = str.split(sys.argv[1], ",")
99 for file in infiles: 104 for file in infiles:
100 os.system("cp %s %s" %(file, Path_IN_loci_NUC)) 105 os.system("cp %s %s" %(file, Path_IN_loci_NUC))
101 106
102 ## 1 ## List taxa 107 ## 1 ## List taxa
103 LT=[] 108 LT=[]
104 cmd="grep '>' %s" % sys.argv[2] 109 cmd="grep '>' {}".format(sys.argv[1])
105 result = subprocess.check_output(cmd, shell=True) 110 result = subprocess.check_output(cmd, shell=True)
106 result=result.split('\n') 111 result=result.split('\n')
107 for i in result: 112 for i in result:
108 sp=i[1:] 113 sp=i[1:]
109 if sp !='': 114 if sp !='':
110 LT.append(sp) 115 LT.append(sp)
111 print LT 116 print LT
112 117
113 #LT = ["Ap", "Ac", "Pg"]
114 #os.system("grep '>' %s" %(sys.argv[1]))
115
116 ## 2 ## PathIN 118 ## 2 ## PathIN
117 # fileIN_properties = open("01_AminoAcid_Properties2.csv", "r")
118 Lloci_NUC = os.listdir(Path_IN_loci_NUC) 119 Lloci_NUC = os.listdir(Path_IN_loci_NUC)
119 120
120 121
121 ## 3 ## PathOUT 122 ## 3 ## PathOUT
122 ## 3.1 ## NUC composition 123 ## 3.1 ## NUC composition