Skip to content

Commit

Permalink
add missing comma, and fix dev prints
Browse files Browse the repository at this point in the history
  • Loading branch information
maxibor committed Oct 8, 2018
1 parent 5e21ed5 commit f374e11
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 19 deletions.
14 changes: 0 additions & 14 deletions bin/normalizedReadCount
Original file line number Diff line number Diff line change
Expand Up @@ -244,24 +244,10 @@ if __name__ == "__main__":
writeBam(inbam=BAM1, outbam=outbam1, commonReads=commonReads)
writeBam(inbam=BAM2, outbam=outbam2, commonReads=commonReads)

print("nb1", nb1)
print("nb2", nb2)
print("gs1", gs1)
print("gs2", gs2)

NormalizedReadRatio = log2((nb1 / gs1) / (nb2 / gs2))

# Template output file structure
# Sample_name,Organism_name1,Organism_name2,Genome1_size,Genome2_size,nb_bp_aligned_genome1,nb_bp_aligned_genome2,NormalizedReadRatio

print(SNAME)
print(ORGANAME1)
print(ORGANAME2)
print(gs1)
print(gs2)
print(nb1)
print(nb2)
print(NormalizedReadRatio)
with open(OUTFILE, 'w') as w:
w.write(SNAME + "," + ORGANAME1 + "," + ORGANAME2 + "," + str(gs1) + "," +
str(gs2) + "," + str(nb1) + "," + str(nb2) + "," + str(NormalizedReadRatio) + "\n")
2 changes: 1 addition & 1 deletion bin/plotAndReport
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def write_csv(adict, CSV):
f.write("Sample_name,Organism_name1,Organism_name2,Genome1_size,Genome2_size,nb_aDNA_bp_aligned_genome1,nb_aDNA_bp_aligned_genome2,NormalizedReadRatio\n")
for akey in adict:
f.write(akey + "," + adict[akey]["orga1"] + "," + adict[akey]
["orga2"] + "," + str(adict[akey]["gs1"]) + "," + str(adict[akey]["gs2"]) + str(adict[akey]["nbp1"]) + "," + str(adict[akey]["nbp2"]) + "," + str(adict[akey]["nrr"]) + "\n")
["orga2"] + "," + str(adict[akey]["gs1"]) + "," + str(adict[akey]["gs2"]) + "," + str(adict[akey]["nbp1"]) + "," + str(adict[akey]["nbp2"]) + "," + str(adict[akey]["nrr"]) + "\n")


if __name__ == "__main__":
Expand Down
4 changes: 2 additions & 2 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ process renameGenome1 {
input:
file (genome) from genome1rename
output:
file ("*.fa") into (genome1Fasta, genome1Size, genome1Log, genome1mapdamage)
file (params.name1+".fa") into (genome1Fasta, genome1Size, genome1Log, genome1mapdamage)
script:
outname = params.name1+".fa"
"""
Expand All @@ -228,7 +228,7 @@ process renameGenome2 {
input:
file (genome) from genome2rename
output:
file ("*.fa") into (genome2Fasta, genome2Size, genome2Log, genome2mapdamage)
file (params.name2+".fa") into (genome2Fasta, genome2Size, genome2Log, genome2mapdamage)
script:
outname = params.name2+".fa"
"""
Expand Down
2 changes: 0 additions & 2 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ profiles {
index2 = 'data/genomes/ecoli/Bowtie2Index/*.bt2'
genome1 = 'data/genomes/bsubtilis/genome.fa'
genome2 = 'data/genomes/ecoli/genome.fa'
genome1Size = 4215606
genome2Size = 4686137
name1 = "Bacillus_subtilis"
name2 = "Escherichia_coli"
phred = 64
Expand Down

0 comments on commit f374e11

Please sign in to comment.