Mercurial > repos > davidvanzessen > mutation_analysis
diff mutation_analysis.py @ 108:6add3e66f4fa draft
Uploaded
author | davidvanzessen |
---|---|
date | Wed, 13 Jul 2016 09:04:15 -0400 |
parents | 01c9993865af |
children | ade5cf6fd2dc |
line wrap: on
line diff
--- a/mutation_analysis.py Wed Jul 13 08:04:13 2016 -0400 +++ b/mutation_analysis.py Wed Jul 13 09:04:15 2016 -0400 @@ -146,35 +146,6 @@ absentAAbyID[c] -= 1 o.write(ID + "\t" + str(cdr1Length) + "\t" + str(cdr2Length) + "\t" + genedic[ID] + "\t" + "\t".join([str(x) for x in absentAAbyID]) + "\n") - - -aa_mutations_file = outfile[:outfile.rindex("/")] + "/aa_mutations.txt" -with open(aa_mutations_file, 'w') as o: - o.write("row.name\t" + "\t".join([str(x) for x in range(1, AALength-1)]) + "\n") - o.write("mutations.at.position\t" + "\t".join([str(x) for x in AA_mutation[1:]]) + "\n") - o.write("AA.at.position\t" + "\t".join([str(x) for x in absentAA]) + "\n") - - -aa_mutations_file_ca = outfile[:outfile.rindex("/")] + "/aa_mutations_ca.txt" -with open(aa_mutations_file_ca, 'w') as o: - o.write("row.name\t" + "\t".join([str(x) for x in range(1, AALength-1)]) + "\n") - o.write("mutations.at.position\t" + "\t".join([str(x) for x in AA_mutation_dic["ca"][1:]]) + "\n") - o.write("AA.at.position\t" + "\t".join([str(x) for x in absentAA]) + "\n") - - -aa_mutations_file_cg = outfile[:outfile.rindex("/")] + "/aa_mutations_cg.txt" -with open(aa_mutations_file_cg, 'w') as o: - o.write("row.name\t" + "\t".join([str(x) for x in range(1, AALength-1)]) + "\n") - o.write("mutations.at.position\t" + "\t".join([str(x) for x in AA_mutation_dic["cg"][1:]]) + "\n") - o.write("AA.at.position\t" + "\t".join([str(x) for x in absentAA]) + "\n") - - -aa_mutations_file_cm = outfile[:outfile.rindex("/")] + "/aa_mutations_cm.txt" -with open(aa_mutations_file_cm, 'w') as o: - o.write("row.name\t" + "\t".join([str(x) for x in range(1, AALength-1)]) + "\n") - o.write("mutations.at.position\t" + "\t".join([str(x) for x in AA_mutation_dic["cg"][1:]]) + "\n") - o.write("AA.at.position\t" + "\t".join([str(x) for x in absentAA]) + "\n") - if linecount == 0: print "No data, exiting" with open(outfile, 'w') as o: