Bowtie2 - Snakemake
0
0
Entering edit mode
2.5 years ago
Mohammed ▴ 10

Hello all,

I am facing a problem where bowtie2 can't recognize its indices when ran through Snakemake. When I try the bash command in terminal it works fine.The indices were downloaded from Bowtie2 website. (I am not sure its a problem with the indices because it works fine when I am running it through the terminal). The error I am getting is:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
(ERR): "../resources/BOWTIE/bowtie" does not exist or is not a Bowtie 2 index
Exiting now ...

And Snakemake code is (sorry for the messed up indentation but the indentation is correct from myside):

import os
import glob

configfile: "../config/config.yaml"

Sample,Read = glob_wildcards("data/{sample}_{read}.fastq.gz")

print(Sample)
rule all:
   input:

       expand("{sample}/bowtie2/unfiltered_aligned.{extension}", sample=Sample, extension=["sam","txt"])
 rule bowtie2:
       input:
           r1 = "data/{sample}_R1.fastq.gz",
           r2 = "data/{sample}_R2.fastq.gz"

        output:
           aligned_sam="{sample}/bowtie2/unfiltered_aligned.sam"
         log:
           "{sample}/bowtie2/unfiltered_aligned.txt"
        threads: 8
        params:
            index = config["ref"]["index"]
        container:
            "docker://biocontainers/bowtie2:v2.4.1_cv1"

        shell:
             """
              bowtie2 --local --no-mixed --no-discordant -p {threads} -x {params.index} -1 {input.r1} -2 {input.r2} -S {output.aligned_sam}  
              &> {log}
              """

and here is the tree structure of the directory

enter image description here

Config file:

ref:
    species: homo_sapiens
    build: "HG38"
    index: "../resources/BOWTIE/bowtie"
docker bowtie2 snakemake • 698 views
ADD COMMENT
0
Entering edit mode

Can you also include the screen output when you run with -np?

ADD REPLY

Login before adding your answer.

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