diff --git a/README.md b/README.md index 071c7a3..1dcbf5d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Phylo_flow pipeline +# Phylo Flow ## Description This tool, developed within the scope of ASB, aims to create a pipeline. diff --git a/python/fasta_cleaner.py b/python/fasta_cleaner.py index e0391ae..a33e76e 100644 --- a/python/fasta_cleaner.py +++ b/python/fasta_cleaner.py @@ -1,15 +1,20 @@ import sys + def clean_fasta(input_file, output_file): """ - Processes a FASTA file to remove all occurrences of the letter 'n' (lowercase) from the DNA sequences. - + Processes a FASTA file to remove all occurrences of the letter 'n' + (lowercase) from the DNA sequences. + Args: input_file (str): The path to the input FASTA file. - output_file (str): The path to the output FASTA file where the cleaned sequences will be saved. - - Each sequence in the file is expected to start with a header line that begins with '>'. - This script retains the header lines and writes the cleaned sequences to the output file. + output_file (str): The path to the output FASTA file + where the cleaned sequences will be saved. + + Each sequence in the file is expected to start + with a header line that begins with '>'. + This script retains the header lines and writes the cleaned sequences + to the output file. """ with open(input_file, 'r') as f, open(output_file, 'w') as fout: for line in f: @@ -19,11 +24,12 @@ def clean_fasta(input_file, output_file): cleaned_sequence = line.strip().replace('N', '') fout.write(cleaned_sequence + '\n') + if __name__ == "__main__": if len(sys.argv) != 3: print("Usage: python3 script_name.py ") sys.exit(1) - + input_file = sys.argv[1] output_file = sys.argv[2] clean_fasta(input_file, output_file) diff --git a/python/newick_tree_visualizer.py b/python/newick_tree_visualizer.py index 62dd0a1..1848fea 100644 --- a/python/newick_tree_visualizer.py +++ b/python/newick_tree_visualizer.py @@ -62,7 +62,7 @@ def tree_generator(infile, outfile): labels = [f"{round(float(s), 2)}" if s else "" for s in support_values] # Create and save the phylogenetic tree plot - canvas, axes, mark = tree.draw(node_labels=labels, node_sizes=30, + canvas, axes, mark = tree.draw(node_labels=labels, node_sizes=30, width=width, height=height, tree_style="n") toyplot.svg.render(canvas, outfile)