Question: SortMeRNA for multiple reads file
0
gravatar for uvika85
4 months ago by
uvika850
uvika850 wrote:

Hi,

I wanted to run SortMeRNA for multiple reads file. but as I know SortMeRNA handles only single file at once. Although it is working on a single fastq file, I wanted to run it on my whole folder which consists of 59 fastq file. I don't know anything about bash. can anybody help me?

sortmerna \
  --ref ./rRNA_databases/silva-bac-16s-id90.fasta,./index/silva-bac-16s-db:./rRNA_databases/silva-bac-23s-id98.fasta,./index/silva-bac-23s-db:./rRNA_databases/silva-arc-16s-id95.fasta,./index/silva-arc-16s-db:./rRNA_databases/silva-arc-23s-id98.fasta,./index/silva-arc-23s-db:./rRNA_databases/silva-euk-18s-id95.fasta,./index/silva-euk-18s-db:./rRNA_databases/silva-euk-28s-id98.fasta,./index/silva-euk-28s:./rRNA_databases/rfam-5s-database-id98.fasta,./index/rfam-5s-db:./rRNA_databases/rfam-5.8s-database-id98.fasta,./index/rfam-5.8s-db \
  --reads SRRXXXXXXX.fastq --aligned SRRXXXXXXX_rrna \
  --other SRRXXXXXXX_sortmerna --fastx --log -a 4
rna-seq • 277 views
ADD COMMENTlink modified 4 months ago by h.mon28k • written 4 months ago by uvika850

Questions about bash loops have been asked many times before, please search the site and try the suggestions proposed at some of them. Some examples:

HISAT2 for loop shell scripting

Even questions about SortMeRNA loops have appeared before:

Running SortMeRNA for bulk RNAseq data

Run merge-paired-reads script for multiple files at the same time (SortMeRNA)

ADD REPLYlink written 4 months ago by h.mon28k

well, I know similar question being answered many time. I wanted to know that if I can process it without bash scripting. because don't know anything about bash Thanks

ADD REPLYlink written 4 months ago by uvika850

When you run SortMeRNA on the command-line, you are already "bash scripting" - you already know more than you think you know.

You can use GNU parallel or snakemake to process several files without (sensu strictu) bash scripting. But, in my opinion, they are more difficult than plain bash scripting, although a lot more powerful.

ADD REPLYlink modified 4 months ago • written 4 months ago by h.mon28k

You can - provided you can use some advanced excel. Put each variable list (file names etc) in one column each, your formula in the last. Replace filenames with pointers to adjacent cells to create strings with your command, copy to all cells below.

very limited, but works for your use case.

ADD REPLYlink written 4 months ago by Carambakaracho1.9k

ok. thank you soo much . I will try that.

ADD REPLYlink written 4 months ago by uvika850

Hi, I am very hopeful that you will sort my problem. I am having multiple files for analysis. I am running sortMeRNA with the command below.

sortmerna --ref ./rRNA_databases/silva-arc-23s-id98.fasta,./index/silva-arc-23s-id98.db:./rRNA_databases/silva-bac-23s-id98.fasta,./index/silva-bac-23s-id98.db:./rRNA_databases/silva-euk-18s-id95.fasta,./index/silva-euk-18s-id95.db:./rRNA_databases/silva-euk-28s-id98.fasta,./index/silva-euk-28s-id98.db:./rRNA_databases/rfam-5s-database-id98.fasta,./index/rfam-5s-database-id98.db:./rRNA_databases/rfam-5.8s-database-id98.fasta,./index/rfam-5.8s.db --reads path_to_file/*.fastq --aligned rrna --other sortmerna --fastx --log -a 4

How can I change the output file name, filename.fastq from above, to reflect the name of the initial input files?

ADD REPLYlink written 4 months ago by uvika850
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1059 users visited in the last hour