This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how Creat un-aligne file with bowtie?

how Creat un-aligne file with bowtie and hisat in order to which cod in linux i can creat un-aligne file with alingment?

alignment

I am also having the same issue ... can someone tell me what's wrong with my cmd?

/bowtie2 -x Human -p 4 --un ./unaligned/try.fq -1 R1.fq -2 R2.fq 1>res.sam 2>res.err

I also tried /bowtie2 -x Human -p 4 --un-gz ./unaligned/try.fq -1 R1.fq -2 R2.fq 1>res.sam 2>res.err

both didn't work - I get an empty file

2 answers

Hello, you can type bowtie2 --help then you probably will see some parameters like

  --un <path>        write unpaired reads that didn't align to <path>
  --al <path>        write unpaired reads that aligned at least once to <path>
  --un-conc <path>   write pairs that didn't align concordantly to <path>
  --al-conc <path>   write pairs that aligned concordantly at least once to <path>
    (Note: for --un, --al, --un-conc, or --al-conc, add '-gz' to the option name, e.g.
    --un-gz <path>, to gzip compress output, or add '-bz2' to bzip2 compress output.)

So you can see if you want to extract those un-align reads you need to use --un-conc parameter in your bowtie2 command. Forexample --un-conc /Example/Unalign.fastq .

Below command is an example to get unaligned file during alignment of paired-end data using bowtie2:

bowtie2 -t -p 2 -q --phred33-quals --mm -x <genomeindexfile> -1 read_1.fq.gz -2 read_2.fq.gz -S out.sam  --un unaligned.sam

Log in to answer this question.