jorvis / biocode

Bioinformatics code libraries and scripts
MIT License
504 stars 247 forks source link

Update fasta_size_report script to python3.10 #80

Closed RPINerd closed 1 year ago

RPINerd commented 1 year ago

Converted and tested the size report script from perl to the latest python3.10

Original credits left intact in documentation

jorvis commented 1 year ago

I appreciate your submitting this!

jorvis commented 1 year ago

In commit 4c0fbde I fixed an assumption that paths passed were relative to the script. After that I compared your output from the original script and they differ, so for now I'm going to keep both (preparing a new biocode release) so I don't break anyone's pipelines which may use it.

jorvis@precision7780:~/git/biocode/fasta$ ./fasta_size_report.py -f /usr/local/projects/gales/test1/prodigal2fasta.faa | tail -5
1_4397_polypeptide  230 >1_4397_polypeptide prodigal2fasta.faa
1_4398_polypeptide  475 >1_4398_polypeptide prodigal2fasta.faa
1_4399_polypeptide  451 >1_4399_polypeptide prodigal2fasta.faa
1_4400_polypeptide  239 >1_4400_polypeptide prodigal2fasta.faa
1_4401_polypeptide  229 >1_4401_polypeptide prodigal2fasta.faa
jorvis@precision7780:~/git/biocode/fasta$ ./fasta_size_report.pl -f /usr/local/projects/gales/test1/prodigal2fasta.faa | tail -5
1_4397_polypeptide  230 >1_4397_polypeptide /usr/local/projects/gales/test1/prodigal2fasta.faa
1_4398_polypeptide  475 >1_4398_polypeptide /usr/local/projects/gales/test1/prodigal2fasta.faa
1_4399_polypeptide  451 >1_4399_polypeptide /usr/local/projects/gales/test1/prodigal2fasta.faa
1_4400_polypeptide  239 >1_4400_polypeptide /usr/local/projects/gales/test1/prodigal2fasta.faa
1_4401_polypeptide  229 >1_4401_polypeptide /usr/local/projects/gales/test1/prodigal2fasta.faa