Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Richard Barker
    Member
    • Apr 2012
    • 47

    #1

    Script error for TopHat & Bowtie 2 for paired end and splice variant detection but?

    I have designed this script to run Bowtie2 on paired end fastq data files for a spliceoform investigation. However, it fails as it can't find the -1 input file, this is very strange as the name is correct...
    Please help as i'm not sure what to try?

    tophat -o 9-0GS_bowtie2_for_splicegrapher -j TAIR10_GFF3_genes.gff --no-convert-bam -a 10 -g 1 -F 0 -p 6 --segment-length=28 --segment-mismatches=0 -i 40 -I 5000 --min-coverage-intron=40 --max-coverage-intron=5000 --min-segment-intron=40 --max-segment-intron=5000 TAIR10_chr_all.bt2 -1 9-0GS_AGTCAA_run298_trimmed_1.fastq -2 9-0GS_AGTCAA_run298_trimmed_2.fastq


    [2012-08-09 15:17:04] Beginning TopHat run (v2.0.4)
    -----------------------------------------------
    [2012-08-09 15:17:04] Checking for Bowtie
    Bowtie version: 2.0.0.7
    [2012-08-09 15:17:04] Checking for Samtools
    Samtools version: 0.1.18.0
    [2012-08-09 15:17:04] Checking for Bowtie index files
    [2012-08-09 15:17:04] Checking for reference FASTA file
    Warning: Could not find FASTA file TAIR10_chr_all.bt2.fa
    [2012-08-09 15:17:04] Reconstituting reference FASTA file from Bowtie index
    Executing: /usr/local/bin/bowtie2-inspect TAIR10_chr_all.bt2 > 9-0GS_bowtie2_for_splicegrapher/tmp/TAIR10_chr_all.bt2.fa
    [2012-08-09 15:17:09] Generating SAM header for TAIR10_chr_all.bt2
    Traceback (most recent call last):
    File "/usr/local/bin/tophat", line 3948, in <module>
    sys.exit(main())
    File "/usr/local/bin/tophat", line 3808, in main
    params.read_params = check_reads_format(params, reads_list)
    File "/usr/local/bin/tophat", line 1725, in check_reads_format
    zf = ZReader(f_name, params)
    File "/usr/local/bin/tophat", line 1678, in __init__
    self.file=open(filename)
    IOError: [Errno 2] No such file or directory: '-1'

    But the directory is there, with the correct name, i've also tried with the whole root directory and got the same message.

    Any ideas?
  • kmcarr
    Senior Member
    • May 2008
    • 1181

    #2
    Originally posted by Richard Barker View Post
    tophat -o 9-0GS_bowtie2_for_splicegrapher -j TAIR10_GFF3_genes.gff --no-convert-bam -a 10 -g 1 -F 0 -p 6 --segment-length=28 --segment-mismatches=0 -i 40 -I 5000 --min-coverage-intron=40 --max-coverage-intron=5000 --min-segment-intron=40 --max-segment-intron=5000 TAIR10_chr_all.bt2 -1 9-0GS_AGTCAA_run298_trimmed_1.fastq -2 9-0GS_AGTCAA_run298_trimmed_2.fastq

    [snip]...
    Warning: Could not find FASTA file TAIR10_chr_all.bt2.fa
    ...[snip]
    Any ideas?
    Richard,

    It's not complaining about not being able to find the read file; it can not find the fasta file associated with your bowtie index. This is because you passed the wrong name for the index file to bowtie. Do not include the .bt2 suffix in the name of the index. Also you need to use '-x' before the index name in your command line. You should specify the index as

    Code:
    -x TAIR10_chr_all
    And make sure that your BOWTIE_INDEXES environment variable is properly set so that it can find the index.

    ETA: Do not use -x! The index name and the read file names do not take option letters.
    Last edited by kmcarr; 08-12-2012, 03:59 PM. Reason: Incorrect parameter advice.

    Comment

    • Richard Barker
      Member
      • Apr 2012
      • 47

      #3
      Thanks for the swift response.

      I replaced TAIR10_chr_all.bt2 with -x TAIR10_chr_all
      and that solved the warning about not finding the FASTA file. Thanks!

      But now it just says
      tophat: option -1 not recognized

      even when i give it the specific fastq file location?

      richard@ubuntu:~/RNA_seq_analysis/paired_end$ tophat -o 9-0GS_bowtie2_for_splicegrapher --no-convert-bam -a 10 -g 1 -F 0 -p 6 --segment-length=28 --segment-mismatches=0 -i 40 -I 5000 --min-coverage-intron=40 --max-coverage-intron=5000 --min-segment-intron=40 --max-segment-intron=5000 -x TAIR10_chr_all -1 /home/richard/RNA_seq_analysis/paired_end/9-0GS_AGTCAA_run298_trimmed_1.fastq -2 /home/richard/RNA_seq_analysis/paired_end/9-0GS_AGTCAA_run298_trimmed_2.fastq
      tophat: option -1 not recognized

      Comment

      • kmcarr
        Senior Member
        • May 2008
        • 1181

        #4
        Originally posted by Richard Barker View Post
        Thanks for the swift response.

        I replaced TAIR10_chr_all.bt2 with -x TAIR10_chr_all
        and that solved the warning about not finding the FASTA file. Thanks!

        But now it just says
        tophat: option -1 not recognized

        even when i give it the specific fastq file location?

        richard@ubuntu:~/RNA_seq_analysis/paired_end$ tophat -o 9-0GS_bowtie2_for_splicegrapher --no-convert-bam -a 10 -g 1 -F 0 -p 6 --segment-length=28 --segment-mismatches=0 -i 40 -I 5000 --min-coverage-intron=40 --max-coverage-intron=5000 --min-segment-intron=40 --max-segment-intron=5000 -x TAIR10_chr_all -1 /home/richard/RNA_seq_analysis/paired_end/9-0GS_AGTCAA_run298_trimmed_1.fastq -2 /home/richard/RNA_seq_analysis/paired_end/9-0GS_AGTCAA_run298_trimmed_2.fastq
        tophat: option -1 not recognized
        Richard,

        What version of TopHat are you running? When I saw in your original post mention of Bowtie2 I assumed you were running TopHat2. To determine which version just run the command:

        Code:
        tophat -v
        and report the output.

        Comment

        • Richard Barker
          Member
          • Apr 2012
          • 47

          #5
          used tophat -v and says I'm running TopHat v2.0.4

          Comment

          • kmcarr
            Senior Member
            • May 2008
            • 1181

            #6
            Originally posted by Richard Barker View Post
            used tophat -v and says I'm running TopHat v2.0.4
            Ah...now I see the problem. You are running tophat but trying to pass command line options as if were bowtie. You do not use the -1 or -2 for tophat (you also should not use -x for the index, that was my mistake, sorry).

            Have a good look at the documentation for TopHat2. No option identifiers are used for the index or read files. They are the last three parameters passed to tophat, in the order shown. Your command should be in the format:

            Code:
            # tophat [options for tophat] <bowtie_index_name> <read1_file> <read2_file>

            Comment

            • Richard Barker
              Member
              • Apr 2012
              • 47

              #7
              Thanks kmcarr, it's running now (if interested the final script is below) and was designed for out puts that can be used by SpliceGrapher (Roger et al 2012 http://splicegrapher.sourceforge.net/).

              The script below has a lot of advance options that were recommended by the creators of SpliceGrapher inorder to optimise splice varient detection. Will the outputs also be suitable for cuffmerg and cuffdiff analysis?

              tophat -o 9-0GS_bowtie2_for_splicegrapher --no-convert-bam -a 10 -g 1 -F 0 -p 6 --segment-length=28 --segment-mismatches=0 -i 40 -I 5000 --min-coverage-intron=40 --max-coverage-intron=5000 --min-segment-intron=40 --max-segment-intron=5000 TAIR10_chr_all 9-0GS_AGTCAA_run298_trimmed_1.fastq 9-0GS_AGTCAA_run298_trimmed_2.fastq

              Comment

              • Richard Barker
                Member
                • Apr 2012
                • 47

                #8
                It worked for the first 2 files but when i went to run the second sample i got the following error message, i'm really not suer what to do?

                richard@ubuntu:~/RNA_seq_analysis/run299_paired_end_for_BowTie_2$ tophat -o 10-0MS_tophat_owtie2_for_splicegrapher --no-convert-bam -a 10 -g 1 -F 0 -p 6 --segment-length=28 --segment-mismatches=0 -i 40 -I 5000 --min-coverage-intron=40 --max-coverage-intron=5000 --min-segment-intron=40 --max-segment-intron=5000 TAIR10_chr_all.bt2 10-0MS_AGTTCC_L002_run298_R1_trimmed.fastq 10-0MS_AGTTCC_L002_run298_R2_trimmed.fastq

                [2012-08-12 14:40:38] Beginning TopHat run (v2.0.4)
                -----------------------------------------------
                [2012-08-12 14:40:38] Checking for Bowtie
                Bowtie version: 2.0.0.7
                [2012-08-12 14:40:38] Checking for Samtools
                Samtools version: 0.1.18.0
                [2012-08-12 14:40:38] Checking for Bowtie index files
                [2012-08-12 14:40:38] Checking for reference FASTA file
                Warning: Could not find FASTA file TAIR10_chr_all.bt2.fa
                [2012-08-12 14:40:38] Reconstituting reference FASTA file from Bowtie index
                Executing: /usr/local/bin/bowtie2-inspect TAIR10_chr_all.bt2 > 10-0MS_tophat_owtie2_for_splicegrapher/tmp/TAIR10_chr_all.bt2.fa
                [2012-08-12 14:40:43] Generating SAM header for TAIR10_chr_all.bt2
                format: fastq
                quality scale: phred33 (default)
                [2012-08-12 14:40:43] Preparing reads
                [FAILED]
                Error running 'prep_reads'
                Error: qual length (121) differs from seq length (87) for fastq record !

                Comment

                • kmcarr
                  Senior Member
                  • May 2008
                  • 1181

                  #9
                  Richard,

                  This is exactly the same error as your original post. Check the solution up-thread (but ignore the bit about adding -x).

                  Comment

                  Latest Articles

                  Collapse

                  • SEQadmin2
                    Beyond CRISPR/Cas9: Understand, Choose, and Use the Right Genome Editing Tool
                    by SEQadmin2



                    CRISPR/Cas9 sparked the gene editing revolution for both research and therapeutics.1 But this system still showed severe issues that limited its applications. The most prominent were the heavy reliance on PAM sequences, delivery limitations, double-stranded breaks that prompt unintended edits and cell death, and editing inefficiency (both in targeting and in knock-in reliability).

                    Despite this, “CRISPR helped turn genome editing from a specialized technique into
                    ...
                    07-31-2026, 11:01 AM
                  • SEQadmin2
                    Proteomic Platforms: How to Choose the Right Analytical Strategy to Improve Detection and Clinical Applications
                    by SEQadmin2


                    Proteomics platforms are evolving rapidly, with advances in mass spectrometry and affinity-based approaches expanding what researchers can detect and at what scale. As the field moves toward deeper proteome coverage and clinical applications, scientists face an increasingly complex landscape of tools. This article will explore how researchers are navigating these choices to find the right platform for their work.

                    The systematic characterization of the human proteome has
                    ...
                    07-20-2026, 11:48 AM
                  • SEQadmin2
                    Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
                    by SEQadmin2



                    Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
                    ...
                    07-09-2026, 11:10 AM

                  ad_right_rmr

                  Collapse

                  News

                  Collapse

                  Topics Statistics Last Post
                  Started by SEQadmin2, Today, 07:41 AM
                  0 responses
                  9 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 08-03-2026, 10:13 AM
                  0 responses
                  22 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 07-31-2026, 02:55 AM
                  0 responses
                  36 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 07-24-2026, 12:17 PM
                  0 responses
                  25 views
                  0 reactions
                  Last Post SEQadmin2  
                  Working...