This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Bash script to combine numerous output files into a spreadsheet?

I am running QUAST to check the quality of assemblies. The output is simply a .tsv file with statistics of interest. I need to do this analysis for >1000 assemblies and then compare all of the output statistics. Is there a way I can populate a new spreadsheet file with all of the individual outputs?

Quast output.tsv files look like this:

name: assembly1

stat1: x

stat2: x

stat3: x

And I want to combine a thousand of these into a spreadsheet that looks like this:

name, stat1, stat2, stat3

assembly1,x,x,x

assembly2,x,x,x

bash quast

2 answers

Hi ! Quast do accept multiple fasta files as input and outputs a summary with all those statistics. You can do something like this:

quast $(find /path/to/fastas/) -o output_dir
find  dir1 dir2 dir3 -type f -name "output.tsv" -exec cut -d ':' -f 2 '{}' ';' | paste -d ','  - - - - 

Log in to answer this question.