This is a test version of Biostars. For the public version, visit https://www.biostars.org.
I want to assembly all the reads at ones in linux

Hello, I'm new in bioinformatics and I need help please in linux

I have folder contain 109 couple of reads Forward and reverse (218 files) and I want to assembly every couple of reads using spades the name of reads is like this SRR....R.fastq.gz (reverse) SRR...F.fastq.gz (forward)

I need to use for loop to assembly all the reads at ones (because I don't want to repeat the same command 109 times for example I have four reads file SRR1.F.fastq.gz SRR2.f.fastq.gz SRR1.R.fastq.gz SRR2.R.fastq.gz and I need to take SRR1.F with SRR1.R and so on

Can you help me please

Thank you in advance

assembly sequence genome

thank you for your response but i didn't find the page (Page not found )

This question has been asked a lot on the forum. Take a look in the "Similar posts" list at the right hand side, or search the forum via the searchbar/google.

Okay i will look for similar posts thank you

1 answer

In Snakemake:

sample = glob_wildcards("path/{sample}.F.fastq.gz")

    rule all:
    input: expand("path/spades_out/{sample}/scaffolds.fa", sample=sample)

    rule spades:
    input: 
    F = "path/{sample}.F.fastq.gz"
    R = "path/{sample}.R.fastq.gz"
    output:
    "path/spades_out/{sample}/scaffolds.fa"
    params:
    out = "path/spades_out/{sample}/"
    shell:
    spades.py -1 {input.F} -2 {input.R} -o {params.out}

Log in to answer this question.