This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to input multiple files from a list of files

I have a list of files in bam_files.txt which looks like this

less bam_files.txt

/home/test/2cells_2_trim.bam
/home/test/6h_1_trim.bam
/home/test/2cells_1_trim.bam
/home/test/6h_2_trim.bam

I want to do something like this

cuffnorm -o cuffnorm_out /home/software/genes.gtf test/*.bam

but while reading files from bam_files.txt and not directly from directory (as shown above).

Can someone please help. Thanks a lot. Appreciate your help.

bash linux rna-seq

1 answer

Perhaps a bash process substitution will help:

$ cuffnorm ... <(cat bam_files.txt | tr '\n' ' ')

Log in to answer this question.