This is a test version of Biostars. For the public version, visit https://www.biostars.org.
cutadapt command line

I am trying to use cutadapt. I don't know where to use the commands in command line or python command line. how do we set the path for the fastq files.

next-gen

2 answers

The commands are shell commands (terminal of your linux computer).

Did you read the manual?

For example the adapter is "TGGAATTCTCGGGTGCCAAGG"

So you will use it from terminal like this:

cutadapt -a TGGAATTCTCGGGTGCCAAGG good_reads.fastq > trimed_good_reads.fastq

If you wanna use it in python script it will be like that

def run_cutadapt(adaptor, input_file, output_file):
    cutadapt = subprocess.Popen(["cutadapt", "-a", adaptor, input_file, "-o",                  output_file], stdout=subprocess.PIPE)
    output = cutadapt.communicate()[0]

    return output

Log in to answer this question.