This is a test version of Biostars. For the public version, visit https://www.biostars.org.
RSEM on single replicate with multiple fasta files

Hi, there,

I'm running RSEM on 12 replicates each replicate has 8 fasta files, paired-end reads.

This is inside 2 For loops with i from 1 to 4 and j from 1 to 4

rsem-calculate-expression -p 8 --bowtie2 --paired-end --strandedness forward --append-names --estimate-rspd --output-genome-bam ~/RNAseq/RSEM_fasta/control-"$i"*_L00"$j"_R1_001.fastq.gz ~/RNAseq/RSEM_fasta/control-"$i"*_L00"$j"_R2_001.fastq.gz  ~/RNAseq/ref/mouse_ensemble ~/RNAseq/RSEM/Control"$i"/sample_"$j"

This command will generate 4 fasta files of single replicate,

is there a way to create a combined one file that includes results from all 4 fasta files for a single replicate

I used this previously For loop with i running from 1 to 12 and j running from 1 to 4 but then I realized that each time it creates a new file with the same name and doesn't really combine with the previous one. So at the end I have files for the last two fasta files for each sample (that's my guess).

rsem-calculate-expression -p 8 --bowtie2 --paired-end --strandedness forward --append-names --estimate-rspd --output-genome-bam ~/RNAseq/RSEM_fasta/*S"$i"*_L00"$j"_R1_001.fastq.gz ~/RNAseq/RSEM_fasta/*-"$i"*_L00"$j"_R2_001.fastq.gz  ~/RNAseq/ref/mouse_ensemble ~/RNAseq/RSEM/sample_"$i"

I still want to combine all fasta files for each replicate into one file and then all those files for 12 replicates into one file

Is there a nice way to do it with RSEM?

Thank you.

rna-seq

1 answer

Why can't you cat the files together before putting them in RSEM? Catting gzipped fastq files works fine.

Thanks, that seems to work...

Log in to answer this question.