Question: Bowtie2 to align ChiPSeq Data
0
gravatar for eilluecaf
9 months ago by
eilluecaf0
eilluecaf0 wrote:

Hi,

I am trying to align some ChiPSeq data with bowtie2 but i am getting error. I am usin the SystemPipeR package and I am following the instruction of the tutorial. The error that I have is the following:

moduleload(modules(args)) # Skip if a module system is not used Error in system(paste0("bash -c \"module load ", module, "; export | grep '^declare -x ", : 'bash' not found

Thanks for your attention.

ADD COMMENTlink modified 9 months ago by h.mon22k • written 9 months ago by eilluecaf0

Can you provide the link to the tutorial that you are attempting to follow?

ADD REPLYlink written 9 months ago by Kevin Blighe33k

Probably this one:

NGS data analysis with R / Bioconductor: ChIP-Seq workflow

ADD REPLYlink written 9 months ago by h.mon22k

Yes, it is the tutorial that I am following

ADD REPLYlink written 9 months ago by eilluecaf0

Obrigado para sua ajuda amigo - estava voltando a Europa desde Rio.

ADD REPLYlink modified 9 months ago • written 9 months ago by Kevin Blighe33k

Are you using Linux / Mac, or are you using Windows? Are you running on a cluster or workstation? Does your system use the Modules package to manage software availability?

ADD REPLYlink written 9 months ago by h.mon22k

I am using Windows and I am running on workstation. My system doesn't have the Modules package, I am going to try to download this package. Sorry, I am a beginner.

ADD REPLYlink written 9 months ago by eilluecaf0

There is no Modules for Windows, as far as I know. And you don't necessarily need to install Modules to run SystemPipeR.

You will have some (likely a lot of) trouble running most bioinformatics software on Windows, unless you install the windows subsystem for linux.

ADD REPLYlink written 9 months ago by h.mon22k
0
gravatar for h.mon
9 months ago by
h.mon22k
Brazil
h.mon22k wrote:

Windows don't have a bash shell, unless you install the windows subsystem for linux. Likewise, most bioinformatics software will not run under Windows, unless you have the windows subsystem for linux. I do not recommend cygwin, there are several quirks and very few users, you won't be able to get help when walking into problems.

ADD COMMENTlink written 9 months ago by h.mon22k

I tryed to run Bowtie 2 in Ubuntu but it is still giving me error. The error message is the following:

bash: module: no se encontró la orden

Do I need to install bash or module?

ADD REPLYlink written 8 months ago by eilluecaf0

Ignore everything related to module in the tutorial, it's not relevant for you.

ADD REPLYlink written 8 months ago by Devon Ryan86k

Having in mind that bashis the default Ubuntu command-line shell, bash is already installed. In fact bash: error means bash is telling you about the error. What was not found was the module command, so you need to stop using the "module load" version of the commands:

moduleload(modules(args)) # Skip if a module system is not used

Modules is a software environment management, used by sysadmins of large, multi-user computers to manage installation of several, sometimes conflicting, software. You certainly don't have it, and probably don't need it.

ADD REPLYlink written 8 months ago by h.mon22k

Okay, I skipped that step. Now I'm failure on the following line:

system("bowtie2-build ./data/tair10.fasta ./data/tair10.fasta") sh: 1: bowtie2-build: not found

I've already installed Bowtie 2 and is in the current directory. Thanks for your attention

ADD REPLYlink written 8 months ago by eilluecaf0

You have to set the PATH environment variable. Search for path bash. If you install bowtie2 from the Ubuntu repositories, it will already be on your PATH

ADD REPLYlink written 8 months ago by h.mon22k

I have added the directory where is bowtie to the PATH variable. And I returns the following error:

system("./bowtie2-2.3.4.1/bowtie2-build ./data/tair10.fasta ./data/tair10.fasta")
Traceback (most recent call last):
  File "./bowtie2-2.3.4.1/bowtie2-build", line 86, in <module>
    main()
  File "./bowtie2-2.3.4.1/bowtie2-build", line 83, in main
    subprocess.call(argv)
  File "/usr/lib/python2.7/subprocess.py", line 523, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
ADD REPLYlink modified 8 months ago by genomax59k • written 8 months ago by eilluecaf0

Why did you provide the same input file name (./data/tair10.fasta) twice (or so it appears above).

ADD REPLYlink written 8 months ago by genomax59k

One is the file, the other will be the base name of the index files.

bowtie2-build [options] <reference_in> <bt2_index_base>

ADD REPLYlink written 8 months ago by h.mon22k

Ah. I generally use a new name or just the first part of fasta file name.

ADD REPLYlink written 8 months ago by genomax59k

Before starting R, did you do:

export PATH=/some/path:$PATH

My mistake, the problem now is bowtie2-build can't find the fasta file. Where is the tair10.fasta file?

ADD REPLYlink modified 8 months ago • written 8 months ago by h.mon22k

I tried this:

export PATH=$PATH:/home/usuario/chipseq/bowtie2-2.3.4.1

ADD REPLYlink written 8 months ago by eilluecaf0

The file is in /home/usuario/chipseq/data but I am using chipseq as working directory, in theory it is correct Now it returns me anothe message:

> system("./bowtie2-2.3.4.1/bowtie2-build ./data/tair10.fasta ./data/tair10.fasta") # Indexes reference genome
./bowtie2-2.3.4.1/bowtie2-build: 20: ./bowtie2-2.3.4.1/bowtie2-build: 
 Copyright 2014, Ben Langmead <langmea@cs.jhu.edu>

 This file is part of Bowtie 2.

 Bowtie 2 is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 Bowtie 2 is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with Bowtie 2.  If not, see <http://www.gnu.org/licenses/>.
: not found
from: can't read /var/mail/collections
./bowtie2-2.3.4.1/bowtie2-build: 31: ./bowtie2-2.3.4.1/bowtie2-build: Syntax error: "(" unexpected
>

I think it can find bowtie2-build but there is another problem.

ADD REPLYlink modified 8 months ago by genomax59k • written 8 months ago by eilluecaf0

1) if you put bowtie2 executables on the PATH, use bowtie2-build instead of ./bowtie2-2.3.4.1/bowtie2-build

2) Why don't you run the same command directly on the shell?

ADD REPLYlink written 8 months ago by h.mon22k

I've done this and I keep getting the same error. When I apply the following lines of the tutorial I get the following

> resources <- list(walltime="1:00:00", ntasks=1, ncpus=cores(args), memory="10G")
> reg <- clusterRun(args, conffile=".BatchJobs.R", template="slurm.tmpl", Njobs=18, runid="01",
+                   resourceList=resources)
Creating dir: /home/usuario/chipseq/results/submitargs01_BJdb_7642
Saving registry: /home/usuario/chipseq/results/submitargs01_BJdb_7642/registry.RData
Adding 18 jobs to DB.
Error in system2(command = command, args = args, stdout = stdout, stderr = stderr,  : 
  error in running command
Además: There were 40 warnings (use warnings() to see them)
> waitForJobs(reg)
Error in checkRegistry(reg, writeable = FALSE) : 
  objeto 'reg' no encontrado
ADD REPLYlink modified 8 months ago by genomax59k • written 8 months ago by eilluecaf0

Can you follow @h.mon's suggestion and run the program in a terminal window directly logged into your server/cluster. Also specify a -o filt.out -e file.err so the actual SLURM error can be captured.

ADD REPLYlink written 8 months ago by genomax59k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1596 users visited in the last hour