Bash script to combine numerous output files into a spreadsheet?
2
0
Entering edit mode
3.1 years ago
braun_tube ▴ 30

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 • 1.1k views
ADD COMMENT
3
Entering edit mode
3.1 years ago
hugo.avila ▴ 530

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
ADD COMMENT
1
Entering edit mode

Thank you!

ADD REPLY
1
Entering edit mode
3.1 years ago
find  dir1 dir2 dir3 -type f -name "output.tsv" -exec cut -d ':' -f 2 '{}' ';' | paste -d ','  - - - - 
ADD COMMENT

Login before adding your answer.

Traffic: 1737 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6