Question: Mapping with tophat2 and setting a Tophat2 output directory?
2
gravatar for mirza
4.5 years ago by
mirza130
India
mirza130 wrote:

Hello, I have successfully installed tophat2 with bowtie2 and samtools and have created my bowtie2 indices. I have paired end reads for several different conditions. My questions: 1. Is it possible to run these different sets in separate terminals simultaneously?

  1. The default output directory is tophat_out. How can I determine a separate output directory for each data set? I tried using the -o/ or --output-dir command given in the tophat manual but its not working.

  2. As I am new to tophat, What is the best approach for mapping, the above method or giving all different sets in a single command line (wouldn't the output be confusing)?

rna-seq tophat • 3.0k views
ADD COMMENTlink modified 4.5 years ago by pld4.9k • written 4.5 years ago by mirza130

Please post the error you're getting with -o/--output-dir

ADD REPLYlink written 4.5 years ago by pld4.9k

It would be easier to understand your problem if you give an example command you entered.

For 2) do you want to map the different conditions together in a single file? I assume not?

ADD REPLYlink written 4.5 years ago by Aerval280
4
gravatar for pld
4.5 years ago by
pld4.9k
United States
pld4.9k wrote:

It looks like you're not putting the arguments in the correct order.

From the Tophat manual:

Usage: tophat [options]* <genome_index_base> <reads1_1[,...,readsN_1]> [reads1_2,...readsN_2]

What you're doing:

tophat <genome_index_base> <reads> [options]*

The flag -o is an option, so it needs to go before you list the genome index and reads. Once tophat gets the genome index and reads, it assumes there's no more information and ignores any remaining input.

Here's your fixed command:

tophat -o Rs_Os2_3day rice_indica Fungal_Rice_Variety2_3day_R1.fastq.gz Fungal_Rice_Variety2_3day_R2.fastq.gz

Note, the position of the output directory option has been moved.

In the future, remember that anytime you see documentation on usage you'll want to be sure to pay attention to the order.

ADD COMMENTlink written 4.5 years ago by pld4.9k
0
gravatar for Carlo Yague
4.5 years ago by
Carlo Yague5.2k
Canada
Carlo Yague5.2k wrote:

1. Is it possible to run these different sets in separate terminals simultaneously?

I guess it is possible, however it might not be faster depending on your computer.

How can I determine a separate output directory for each data set?

-o should work. Would you mind showing your code ?

What is the best approach for mapping, the above method or giving all different sets in a single command line (wouldn't the output be confusing)?

I suggest to proceed with 1 alignment -> 1 tophat command. If you want to automate the process, you can always write a shell script.

ADD COMMENTlink written 4.5 years ago by Carlo Yague5.2k

@Carlo.Ankou If one wants to map the reads to exact position from where it originated in genome, how could one achieve that. I am confused with the options -M,-x and -g parameters. Kindly guide me

ADD REPLYlink modified 4.5 years ago • written 4.5 years ago by EVR570

Then I think you should ask a separate question.

ADD REPLYlink written 4.5 years ago by Carlo Yague5.2k

can you suggest sources to get some help with this script writing particularly?

ADD REPLYlink written 4.5 years ago by mirza130
1

about shell scripts : http://linuxcommand.org/lc3_writing_shell_scripts.php

a related question : bash loop for alignment RNA-seq data

ADD REPLYlink modified 4.5 years ago • written 4.5 years ago by Carlo Yague5.2k

Writing shell scripts is easy if you know just the basic syntax. I learned from this article many skills:Writing shell scripts

ADD REPLYlink written 2.7 years ago by mokhtarali20010
0
gravatar for mirza
4.5 years ago by
mirza130
India
mirza130 wrote:

@carlo

  1. I am using a dell tower workstation (265gb ram), so I think there shouldn't be any memory issues.

  2. I used all the following command lines, but I can't see any directory being made-

    $ tophat rice_indica Fungal_Rice_Variety2_3day_R1.fastq.gz Fungal_Rice_Variety2_3day_R2.fastq.gz -o Rs_Os2_3day

    $ tophat rice_indica Fungal_Rice_Variety2_3day_R1.fastq.gz Fungal_Rice_Variety2_3day_R2.fastq.gz -o/ Rs_Os2_3day

    $ tophat rice_indica Fungal_Rice_Variety2_3day_R1.fastq.gz Fungal_Rice_Variety2_3day_R2.fastq.gz --output-dir Rs_Os2_3day

ADD COMMENTlink modified 4.5 years ago by genomax92k • written 4.5 years ago by mirza130
1

Is the program actually running? Do you have write permissions on the local directory (since you are directing -o to current directory)?
Don't use the "Submit Answer" dialog box to provide additional information/respond to previous posts/comments. Use the ADD REPLY/ADD COMMENT boxes against the posts you are responding to for that purpose.

ADD REPLYlink modified 4.5 years ago • written 4.5 years ago by genomax92k

I apologize for the mistake.

ADD REPLYlink written 4.5 years ago by mirza130

Is there an error ? What is written on your terminal after one of those command ? are all the required files in your current directory ?

ADD REPLYlink written 4.5 years ago by Carlo Yague5.2k

the second has -o/ with the slash being an error: -o Rs_Os2_3day third: For double dash flags you usually need an equality sign: --output-dir=Rs_Os2_3day

ADD REPLYlink modified 4.5 years ago • written 4.5 years ago by Aerval280

@Aerval Thanks for your reply. @carlos I am a new user so I could post limited comments yesterday. All files are in the current directory. Tophat is running successfully both with and without -o I completed a run yesterday without -o in the command line. Today I have started another run with -o , the program seems to be running but still can't see the output directory. I am copying the messages on the terminal for a -o command line

gopaljee@ubuntu:~/Softwares/bowtie2-2.2.9/example/index$ tophat rice_indica Fungal_Rice_Variety2_3day_R1.fastq.gz Fungal_Rice_Variety2_3day_R2.fastq.gz -o v2_3d_out

[2016-05-10 10:13:31] Beginning TopHat run (v2.0.9)
-----------------------------------------------
[2016-05-10 10:13:31] Checking for Bowtie
          Bowtie version:    2.1.0.0
[2016-05-10 10:13:31] Checking for Samtools
        Samtools version:    0.1.19.0
[2016-05-10 10:13:31] Checking for Bowtie index files (genome)..
[2016-05-10 10:13:31] Checking for reference FASTA file
[2016-05-10 10:13:31] Generating SAM header for rice_indica
    format:      fastq
    quality scale:   phred33 (default)
[2016-05-10 10:13:32] Preparing reads
        left reads: min. length=100, max. length=100, 21763247 kept reads (12185 discarded)
    right reads: min. length=100, max. length=100, 21727897 kept reads (47535 discarded)
[2016-05-10 10:28:43] Mapping left_kept_reads to genome rice_indica with Bowtie2
ADD REPLYlink modified 4.5 years ago by genomax92k • written 4.5 years ago by mirza130

tophat seems to work properly... that's weird. Four things you could try :

1 - type ls -lAh in the terminal and make sure that the folder v2_3d_out doesn't exist.

2 - try using absolute path to specify the folder, such as ~/Softwares/bowtie2-2.2.9/example/index/v2_3d_out

3 - try using sudo when calling tophat sudo tophat rice_indica Fungal_Rice_Variety2_3day_R1.fastq.gz Fungal_Rice_Variety2_3day_R2.fastq.gz -o v2_3d_out

4 - What if you create the directory by yourself before calling tophat ?

Let me know if one of these works.

ADD REPLYlink modified 4.5 years ago • written 4.5 years ago by Carlo Yague5.2k
1

Option #3 is atomic. That should never be needed to run a user level program. Edit: TopHat will re-use a directory if it exists.

ADD REPLYlink modified 4.5 years ago • written 4.5 years ago by genomax92k

@carlo used the 2rd and 4th option, didn't work...its really weird. don't understand the 1st option, so didn't try. Didn't try the 3rd option due to genomax2's comment.

ADD REPLYlink written 4.5 years ago by mirza130

moved all the files to a new index directory, still no option works. It created a new tophat_out directory itself by default.

ADD REPLYlink written 4.5 years ago by mirza130
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: 1219 users visited in the last hour