SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
CASAVA 1.7 Install Help aligenie Bioinformatics 29 05-23-2014 02:58 AM
Install TopHat chengeng Bioinformatics 14 12-02-2013 07:17 PM
bowtie index problem (bowtie-build and then bowtie-inspect) tgenahmet Bioinformatics 4 09-10-2013 11:51 AM
How to install ALLPATHLG? skblazer Bioinformatics 0 01-12-2011 11:59 AM
Install TopHat knoto Bioinformatics 0 11-05-2009 02:46 AM

Reply
 
Thread Tools
Old 09-26-2014, 06:56 PM   #41
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,976
Default

In this case the index is already pre-built for lambda virus (the files in the index directory).

I would suggest getting prebuilt sequence/index/annotation bundle from Illumina iGenomes site if you are working with a genome available there: http://support.illumina.com/sequenci...e/igenome.html. Otherwise you can follow the directions here to build a bowtie2 index: http://bowtie-bio.sourceforge.net/bo...-build-indexer
GenoMax is offline   Reply With Quote
Old 09-30-2014, 07:12 AM   #42
zillur
Senior Member
 
Location: Puerto Rico

Join Date: Sep 2014
Posts: 106
Default

Thank you very much. Now can you tell me in which point I am wrong?
Here is my files and commands.


Mds-MacBook-Pro:~ ZILLURRAHMAN$ cd desktop/bioinformatics
Mds-MacBook-Pro:bioinformatics ZILLURRAHMAN$ cd bow-tie
Mds-MacBook-Pro:bow-tie ZILLURRAHMAN$ cd bowtie2-2.2.3
Mds-MacBook-Pro:bowtie2-2.2.3 ZILLURRAHMAN$ ls
AUTHORS bowtie2-align-l-debug bowtie2-inspect
LICENSE bowtie2-align-s bowtie2-inspect-l
MANUAL bowtie2-align-s-debug bowtie2-inspect-l-debug
MANUAL.markdown bowtie2-build bowtie2-inspect-s
NEWS bowtie2-build-l bowtie2-inspect-s-debug
TUTORIAL bowtie2-build-l-debug doc
VERSION bowtie2-build-s example
bowtie2 bowtie2-build-s-debug scripts
bowtie2-align-l bowtie2-buildc
Mds-MacBook-Pro:bowtie2-2.2.3 ZILLURRAHMAN$ cd example
Mds-MacBook-Pro:example ZILLURRAHMAN$ ls
commands index reads reference
Mds-MacBook-Pro:example ZILLURRAHMAN$ cd index
Mds-MacBook-Pro:index ZILLURRAHMAN$ ls
lambda_virus.1.bt2 lambda_virus.4.bt2 lambdaout
lambda_virus.2.bt2 lambda_virus.rev.1.bt2
lambda_virus.3.bt2 lambda_virus.rev.2.bt2
Mds-MacBook-Pro:index ZILLURRAHMAN$ cd ..
Mds-MacBook-Pro:example ZILLURRAHMAN$ cd reads
Mds-MacBook-Pro:reads ZILLURRAHMAN$ ls
longreads.fq reads_1.fq reads_2.fq simulate.pl
Mds-MacBook-Pro:reads ZILLURRAHMAN$ cd ..
Mds-MacBook-Pro:example ZILLURRAHMAN$ cd reference/
Mds-MacBook-Pro:reference ZILLURRAHMAN$ ls
lambda_virus.fa lambdaout.4.bt2 out
lambdaout.1.bt2 lambdaout.rev.1.bt2 out.sam
lambdaout.2.bt2 lambdaout.rev.2.bt2
lambdaout.3.bt2 nohup.out
Mds-MacBook-Pro:reference ZILLURRAHMAN$ cd ..
Mds-MacBook-Pro:example ZILLURRAHMAN$ open commands
Mds-MacBook-Pro:example ZILLURRAHMAN$ nohup bowtie2 -x lambdaout -q ../reads/reads_1.fq, ../reads/reads_2.fq -S out.sam
appending output to nohup.out
Mds-MacBook-Pro:example ZILLURRAHMAN$ tail nohup.out
Extra parameter(s) specified: "../reads/reads_2.fq"
Error: Encountered internal Bowtie 2 exception (#1)
Command: /Users/ZILLURRAHMAN/Desktop/Bioinformatics/Bow-tie/bowtie2-2.2.3/bowtie2-align-s --wrapper basic-0 -x lambdaout -q -S out.sam ../reads/reads_1.fq, ../reads/reads_2.fq
(ERR): bowtie2-align exited with value 1
Mds-MacBook-Pro:example ZILLURRAHMAN$ ls
commands index nohup.out reads reference
Mds-MacBook-Pro:example ZILLURRAHMAN$
zillur is offline   Reply With Quote
Old 09-30-2014, 07:52 AM   #43
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,976
Default

What other contents are there in nohup.out file?

Are you following the steps in the bowtie tutorial here: http://bowtie-bio.sourceforge.net/bo...-phage-example
GenoMax is offline   Reply With Quote
Old 10-09-2014, 08:41 AM   #44
zillur
Senior Member
 
Location: Puerto Rico

Join Date: Sep 2014
Posts: 106
Default

Thank you very much. Now after making the paths for indexing, build, align I can align bowtie2 files. I aligned the example lambda virus. Now I want to convert the sam file into bam file and then using flagstat I have to assess the quality of the alignments. I have downloaded samtools from
http://sourceforge.net/projects/samt...d?source=files

Now do I need to make path for the executables using such command lines
(export SAMTOOLS_HOME=/Users/ecerami/libraries/samtools-0.1.19
export PATH=$SAMTOOLS_HOME:$PATH
export PATH=$SAMTOOLS_HOME/bcftools/:$PATH
export PATH=$SAMTOOLS_HOME/misc/:$PATH)

There are too many files. Which are executables? If all are executables do I need to make path for all of these?

Regards
Zillur

Here is my files.
AUTHORS
bam_aux.c
bam_cat.c
bam_color.c
bam_endian.h
bam_flags.c
bam_import.c
bam_index.c
bam_lpileup.c
bam_lpileup.h
bam_mate.c
bam_md.c
bam_plbuf.c
bam_plbuf.h
bam_plcmd.c
bam_reheader.c
bam_rmdup.c
bam_rmdupse.c
bam_sort.c
bam_split.c
bam_stat.c
bam_tview_curses.c
bam_tview_html.c
bam_tview.c
bam_tview.h
bam.c
bam.h
bam2bcf_indel.c
bam2bcf.c
bam2bcf.h
bam2depth.c
bamshuf.c
bamtk.c
bedcov.c
bedidx.c
ChangeLog.old
cut_target.c
errmod.c
errmod.h
examples
faidx.c
htslib-1.1
INSTALL
kaln.c
kaln.h
kprobaln.c
kprobaln.h
LICENSE
Makefile
Makefile.mingw
misc
NEWS
padding.c
phase.c
README
sam_header.c
sam_header.h
sam_view.c
sam.c
sam.h
sample.c
sample.h
samtools.1
samtools.h
stats_isize.c
stats_isize.h
stats.c
zillur is offline   Reply With Quote
Old 10-09-2014, 09:14 AM   #45
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,976
Default

Samtools needs to be compiled. Have you done a "make" in the samtools directory? Does not look like you have based on the listing.
GenoMax is offline   Reply With Quote
Old 10-09-2014, 09:34 AM   #46
zillur
Senior Member
 
Location: Puerto Rico

Join Date: Sep 2014
Posts: 106
Default

Thank you very much. I have typed "make" in the directory. Now my files are

Mds-MacBook-Pro:samtools-1.1 ZILLURRAHMAN$ ls
AUTHORS bam_plbuf.c faidx.c
ChangeLog.old bam_plbuf.h faidx.o
INSTALL bam_plbuf.o htslib-1.1
LICENSE bam_plcmd.c kaln.c
Makefile bam_plcmd.o kaln.h
Makefile.mingw bam_reheader.c kaln.o
NEWS bam_reheader.o kprobaln.c
README bam_rmdup.c kprobaln.h
bam.c bam_rmdup.o kprobaln.o
bam.h bam_rmdupse.c libbam.a
bam.o bam_rmdupse.o libhts.a
bam2bcf.c bam_sort.c misc
bam2bcf.h bam_sort.o padding.c
bam2bcf.o bam_split.c padding.o
bam2bcf_indel.c bam_split.o phase.c
bam2bcf_indel.o bam_stat.c phase.o
bam2depth.c bam_stat.o sam.c
bam2depth.o bam_tview.c sam.h
bam_aux.c bam_tview.h sam.o
bam_aux.o bam_tview.o sam_header.c
bam_cat.c bam_tview_curses.c sam_header.h
bam_cat.o bam_tview_curses.o sam_header.o
bam_color.c bam_tview_html.c sam_view.c
bam_color.o bam_tview_html.o sam_view.o
bam_endian.h bamshuf.c sample.c
bam_flags.c bamshuf.o sample.h
bam_flags.o bamtk.c sample.o
bam_import.c bamtk.o samtools
bam_import.o bedcov.c samtools.1
bam_index.c bedcov.o samtools.h
bam_index.o bedidx.c stats.c
bam_lpileup.c bedidx.o stats.o
bam_lpileup.h cut_target.c stats_isize.c
bam_lpileup.o cut_target.o stats_isize.h
bam_mate.c errmod.c stats_isize.o
bam_mate.o errmod.h test
bam_md.c errmod.o version.h
bam_md.o examples win32
Mds-MacBook-Pro:samtools-1.1 ZILLURRAHMAN$ make
make: Nothing to be done for `all'.

Is it compiled now? What should i do next?

Regards
Zillur
zillur is offline   Reply With Quote
Old 10-09-2014, 10:00 AM   #47
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,976
Default

Looks like the compilation is done. Can you run the samtools executable like so

Code:
$ samtools-1.1/samtools
That should print some help messages.
GenoMax is offline   Reply With Quote
Old 10-09-2014, 06:04 PM   #48
zillur
Senior Member
 
Location: Puerto Rico

Join Date: Sep 2014
Posts: 106
Default

Thank you very much. Yes, I think its working now.

Mds-MacBook-Pro:samtools ZILLURRAHMAN$ samtools-1.1/samtools

Program: samtools (Tools for alignments in the SAM format)
Version: 1.1 (using htslib 1.1)

Usage: samtools <command> [options]

Commands:
-- indexing
faidx index/extract FASTA
index index alignment
-- editing
calmd recalculate MD/NM tags and '=' bases
fixmate fix mate information
reheader replace BAM header
rmdup remove PCR duplicates
targetcut cut fosmid regions (for fosmid pool only)
-- file operations
bamshuf shuffle and group alignments by name
cat concatenate BAMs
merge merge sorted alignments
mpileup multi-way pileup
sort sort alignment file
split splits a file by read group
bam2fq converts a BAM to a FASTQ
-- stats
bedcov read depth per BED region
depth compute the depth
flagstat simple stats
idxstats BAM index stats
phase phase heterozygotes
stats generate stats (former bamcheck)
-- viewing
flags explain BAM flags
tview text alignment viewer
view SAM<->BAM<->CRAM conversion

Mds-MacBook-Pro:samtools ZILLURRAHMAN$
What next? I aligned the example lambda virus. Now I want to convert the sam file into bam file and then using flagstat I have to assess the quality of the alignments.

Regards
Zillur
zillur is offline   Reply With Quote
Old 10-10-2014, 03:52 AM   #49
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,976
Default

Quote:
Originally Posted by zillur View Post
What next? I aligned the example lambda virus. Now I want to convert the sam file into bam file and then using flagstat I have to assess the quality of the alignments.

Regards
Zillur
http://bowtie-bio.sourceforge.net/bo...ols-downstream
GenoMax is offline   Reply With Quote
Old 10-15-2014, 07:13 AM   #50
zillur
Senior Member
 
Location: Puerto Rico

Join Date: Sep 2014
Posts: 106
Default

Thank you very much. I am using these following command lines. But:-
upr189081:reference ZILLURRAHMAN$ $BT2_HOME/bowtie2 -x $BT2_HOME/example/index/lambda_virus -1 $BT2_HOME/example/reads/reads_1.fq -2 $BT2_HOME/example/reads/reads_2.fq -S eg2.sam
-bash: /bowtie2: No such file or directory
upr189081:reference ZILLURRAHMAN$

What should I do now?
zillur is offline   Reply With Quote
Old 10-15-2014, 07:25 AM   #51
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,976
Default

What is $BT2_HOME set to? Is bowtie2 in $BT2_HOME directory?
GenoMax is offline   Reply With Quote
Old 10-15-2014, 07:37 AM   #52
zillur
Senior Member
 
Location: Puerto Rico

Join Date: Sep 2014
Posts: 106
Default

I don't know. Here is my directory.
upr189081:~ ZILLURRAHMAN$ cd desktop/bioinformatics/bow-tie/bowtie2-2.2.3/example/
zillur is offline   Reply With Quote
Old 10-15-2014, 07:41 AM   #53
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,976
Default

$BT2_HOME designates a variable that you need to set, before you can use it in a command line.

Code:
$ export BT2_HOME=/path_to/desktop/bioinformatics/bow-tie/bowtie2-2.2.3
Replace the path_to part with real full path.
GenoMax is offline   Reply With Quote
Old 10-15-2014, 08:05 AM   #54
zillur
Senior Member
 
Location: Puerto Rico

Join Date: Sep 2014
Posts: 106
Default

Thank you very much. Here is my bash profile. I have tried. But.....May be I am missing something....

upr189081:~ ZILLURRAHMAN$ open ~/.bash_profile
upr189081:~ ZILLURRAHMAN$ open ~/.bash_profile
upr189081:~ ZILLURRAHMAN$ cd desktop/bioinformatics/bow-tie/bowtie2-2.2.3/example/
upr189081:example ZILLURRAHMAN$ $BT2_HOME/bowtie2 -x $BT2_HOME/example/index/lambda_virus -1 $BT2_HOME/example/reads/reads_1.fq -2 $BT2_HOME/example/reads/reads_2.fq -S eg2.sam
-bash: /bowtie2: No such file or directory
upr189081:example ZILLURRAHMAN$ cat ~/.bash_profile
export PATH="/Users/ZILLURRAHMAN/Desktop/Bioinformatics/Bow-tie/bowtie2-2.2.3/:$PATH"
export PATH=“users/ZILLURRAHMAN/desktop/bioinformatics/bow-tie/bowtie2-2.2.3/BT2_HOME:$PATH”
upr189081:example ZILLURRAHMAN$ cd
upr189081:~ ZILLURRAHMAN$ open ~/.bash_profile
upr189081:~ ZILLURRAHMAN$ $BT2_HOME/bowtie2 -x $BT2_HOME/example/index/lambda_virus -1 $BT2_HOME/example/reads/reads_1.fq -2 $BT2_HOME/example/reads/reads_2.fq -S eg2.sam
-bash: /bowtie2: No such file or directory
upr189081:~ ZILLURRAHMAN$ cat ~/.bash_profile
export PATH="/Users/ZILLURRAHMAN/Desktop/Bioinformatics/Bow-tie/bowtie2-2.2.3/:$PATH"
export PATH=“users/ZILLURRAHMAN/desktop/bioinformatics/bow-tie/bowtie2-2.2.3/BT2_HOME:$PATH”
$ export BT2_HOME=/path_to/desktop/bioinformatics/bow-tie/bowtie2-2.2.3
upr189081:~ ZILLURRAHMAN$
zillur is offline   Reply With Quote
Old 10-15-2014, 09:33 AM   #55
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,976
Default

At this point try following.

Code:
$ cd desktop/bioinformatics/bow-tie/bowtie2-2.2.3

$ bowtie2 -x example/index/lambda_virus -1 example/reads/reads_1.fq -2 example/reads/reads_2.fq -S eg2.sam
You really need to go back and understand the concept of relative paths, working directories (this info is included in the Korf lab unix course I had pointed you to).
GenoMax is offline   Reply With Quote
Old 10-17-2014, 07:42 PM   #56
zillur
Senior Member
 
Location: Puerto Rico

Join Date: Sep 2014
Posts: 106
Default

Hi,
Thank you very much. Here I got an unusual problem. In my terminal basic commands are not found like:

mds-macbook-pro:~ ZILLURRAHMAN$ ls
-bash: ls: command not found
mds-macbook-pro:~ ZILLURRAHMAN$ env
-bash: env: command not found
mds-macbook-pro:~ ZILLURRAHMAN$ edit
-bash: edit: command not found
mds-macbook-pro:~ ZILLURRAHMAN$ open
-bash: open: command not found
mds-macbook-pro:~ ZILLURRAHMAN$ vi
-bash: vi: command not found
mds-macbook-pro:~ ZILLURRAHMAN$ tail
-bash: tail: command not found
mds-macbook-pro:~ ZILLURRAHMAN$ ls
-bash: ls: command not found
But echo is working. Like: mds-macbook-pro:~ ZILLURRAHMAN$ echo $PATH
“users/ZILLURRAHMAN/desktop/bioinformatics/bow-tie/bowtie2-2.2.3/BT2_HOME:??

I can call up programs like pico using their full path like /usr/bin/pico.
Then a new window open
The header:GNU nano 2.0.6 New Buffer

The footer: ^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur Pos
^X Exit ^J Justify ^W Where Is ^V Next Page ^U UnCut Text^T To Spell

But these ^G/^O/^R/^Y.... anything is not working.

I guess the issue is that my PATH is messed up. How can I get back my path?
zillur is offline   Reply With Quote
Old 10-18-2014, 04:00 AM   #57
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,976
Default

See if you are able to fix it with this: http://superuser.com/questions/60570...und-on-mac-osx Adjust additional values for PATH as needed.
GenoMax is offline   Reply With Quote
Old 10-18-2014, 07:30 AM   #58
zillur
Senior Member
 
Location: Puerto Rico

Join Date: Sep 2014
Posts: 106
Default

Thank you very much. But how I open the vi editor to reset the path? as my my vi/vim command also not working.
Mds-MacBook-Pro:~ ZILLURRAHMAN$ vi
-bash: vi: command not found
Mds-MacBook-Pro:~ ZILLURRAHMAN$ vim
-bash: vim: command not found
Mds-MacBook-Pro:~ ZILLURRAHMAN$ -vi
-bash: -vi: command not found
Mds-MacBook-Pro:~ ZILLURRAHMAN$
zillur is offline   Reply With Quote
Old 10-18-2014, 07:46 AM   #59
blancha
Senior Member
 
Location: Montreal

Join Date: May 2013
Posts: 367
Default

Just type the full path to vi or vim.
It should be:
/usr/bin/vi
or
/usr/bin/vim
blancha is offline   Reply With Quote
Old 10-18-2014, 03:03 PM   #60
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,976
Default

Quote:
Originally Posted by zillur View Post
Thank you very much. But how I open the vi editor to reset the path? as my my vi/vim command also not working.
Mds-MacBook-Pro:~ ZILLURRAHMAN$ vi
-bash: vi: command not found
Mds-MacBook-Pro:~ ZILLURRAHMAN$ vim
-bash: vim: command not found
Mds-MacBook-Pro:~ ZILLURRAHMAN$ -vi
-bash: -vi: command not found
Mds-MacBook-Pro:~ ZILLURRAHMAN$
Use blancha's advice above or use a visual editor to make/edit the file (textedit). See: http://www.tech-recipes.com/rx/2618/...with_textedit/
GenoMax is offline   Reply With Quote
Reply

Tags
bowtie

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 07:21 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO