Bowtie2 to align ChiPSeq Data
1
0
Entering edit mode
6.1 years ago
eilluecaf • 0

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.

ChIP-Seq alignment systemPipeR • 3.8k views
ADD COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode
ADD REPLY
0
Entering edit mode

Yes, it is the tutorial that I am following

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode
6.1 years ago
h.mon 35k

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 COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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

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

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

I tried this:

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

ADD REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY

Login before adding your answer.

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