Commit d675114f authored by MARTIN Pierre's avatar MARTIN Pierre
Browse files

sorted sample files to avoid random output

parent 68d095e3
......@@ -145,7 +145,7 @@ print(str(
# For each count file (output of featureCounts), reading of lines one by one,
# recovery of name of gene and count number and incrementing of corresponding
# value in d_count_by_g_clstr.
for (count_idx,counts_path) in enumerate(files_of_counts):
for (count_idx,counts_path) in enumerate(sorted(files_of_counts)):
with open(counts_path) as fh:
for f_gene_counts in fh:
if f_gene_counts.startswith('#') \
......@@ -80,7 +80,7 @@ with open(args.list_of_file_diamond) as fdiamond_list:
concat_eggnog_mapper_files = pd.DataFrame()
# Concatenate annotation files.
for (annotations_idx,annotations_path) in enumerate(files_of_annotations):
for (annotations_idx,annotations_path) in enumerate(sorted(files_of_annotations)):
eggnog_mapper_file = pd.read_csv(annotations_path, delimiter='\t', decimal='.',skiprows=4)
concat_eggnog_mapper_files = pd.concat([concat_eggnog_mapper_files, eggnog_mapper_file])
......@@ -88,7 +88,7 @@ for (annotations_idx,annotations_path) in enumerate(files_of_annotations):
concat_diamond_files = pd.DataFrame()
# Concatenate diamond files.
for (diamond_idx,diamond_path) in enumerate(diamond_files):
for (diamond_idx,diamond_path) in enumerate(sorted(diamond_files)):
diamond_columns = ["qseqid","sseqid","pident","length","mismatch","gapopen","qstart","qend","sstart","send","evalue","bitscore","qlen","slen","stitle"]
diamond_file = pd.read_csv(diamond_path, delimiter='\t', decimal='.', header=None, names=diamond_columns)
diamond_file.loc[:,"sseqid"] = '' + diamond_file.loc[:,"sseqid"]
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