Using TRF in multiple files
0
0
Entering edit mode
17 months ago
schlogl ▴ 160

Hi there guys.

I would like to run trf in a lot of fasta files, however, when I tried this simple loop:

#! usr/bin/env bash
# Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia
for fasta in /Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/*_chr.fna; 
do
   trf "$fasta" 2 7 7 80 10 50 500 -h
done

It seems to run over one file and then stops. I was looking for 78 files. Any tip to make this work out? Thanks for your time. Paulo

As Dr Pierre asked:

bash run_TRF.sh Bacteria Pseudomonadota Acidithiobacillia
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_000020825.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_000021485.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_000175575.2_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_000179815.2_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_000214095.3_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_000221025.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_000423825.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_000559045.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_000709715.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_000732185.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_000750615.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_001303835.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_001304215.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_001304445.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_001650235.3_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_001685225.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_001705625.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_001705695.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_001705755.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_001705805.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_001756675.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_001756725.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_001756745.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_001857665.2_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_001931655.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_002079865.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_002255305.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_002733395.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_003309025.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_003721225.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_003966655.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_006718285.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_008694225.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_008926505.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_009662475.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_010378095.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_010577825.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_013462805.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_015100135.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_015100155.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_016250455.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_016936895.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_017165985.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_018853545.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_018853575.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_018853595.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_018853615.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_018853815.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_018853935.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_018854535.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_018854545.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_018854555.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_018854615.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_018854635.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_018854695.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_018854755.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_018854775.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_018854785.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_018854825.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_018854855.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_018854875.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_019400025.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_019572245.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_019572275.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_019856615.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_020221655.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_020844025.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_020887015.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_022730435.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_023255755.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_024396695.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_024626545.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_027445705.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_027446465.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_027446505.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_028065135.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_028215975.1_chr.fna 2 7 7 80 10 50 500 -h
trf /media/paulosschlogl/Paulo/pauloscchlogl/Genome_kmers/Genomes_new/Bacteria/Pseudomonadota/Acidithiobacillia/CHR/GCA_900174455.1_chr.fna 2 7 7 80 10 50 500 -h
tandem TRF repeats • 767 views
ADD COMMENT
1
Entering edit mode

replace

trf ...

with

echo trf ...

and show us the output

ADD REPLY
1
Entering edit mode

You are running the command interactively at moment. So your loop will run the first command (from the list above) and wait until it completes before moving on to next one. If you have the cores available you could try parallel? You could put them all in background (&) but it may grind your computer to a halt depending on how heavy a lift is to run trf.

ADD REPLY
0
Entering edit mode

I am thinking to make a big fasta and run trf on it. Thank you for your time bro.

ADD REPLY

Login before adding your answer.

Traffic: 2973 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