Skip to content

Commit

Permalink
changing the header of the output file
Browse files Browse the repository at this point in the history
  • Loading branch information
anastasiia committed Nov 26, 2018
1 parent 0b7318e commit a0e3033
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions find_exons.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,16 +347,16 @@ def plot_and_output(all_genes, output_directory, gene_groups):

#now write an output file containing names of genes, their length, the sum length of exons and the prozent of exons in the gene length as score
output_file = open(os.path.join(output_directory, "genes_exons_correlation.txt"), 'w')
header = ["gene_name", "exons_len_percentage", "gene_length", "exons_sum_length"]
header = ["#gene_name", "exons_len_percentage", "gene_length", "exons_sum_length"]
output_file.write('\t'.join(header) + '\n') #write the header

for i in range(len(gene_names)):
output_file.write('\t'.join([gene_names[i], str(scores[i]), str(gene_lengths[i]), str(exons_lengths[i])]) + '\n')

output_file.close()

logger.info("making a plot")
make_plot(gene_lengths, exons_lengths, gene_names, output_directory, "genes_exons_correlation.png", 'gold')
#logger.info("making a plot")
#make_plot(gene_lengths, exons_lengths, gene_names, output_directory, "genes_exons_correlation.png", 'gold')

def main():

Expand Down

0 comments on commit a0e3033

Please sign in to comment.