Unconfigured Ad

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

    #1

    Cuffdiff won't open TopHat accepted_hits.bam

    I'm following the Tuxedo protocol with 100cycle single directional illumina hi Seq 2000 data. I have used Tophat and Bowtie to align my reads to the Arabidopsis genome, I then used Cufflinks to search for splice-variants and Cuffmerge to join the files together. I now want to use Cuffdiff to examine the differential gene and isoform expression but get the following error message...

    File ./home/richard/RNA_seq_analysis/run296_tophat/9-0GS_AGTCAA_run296_tophat/accepted_hits.bam doesn't appear to be a valid BAM file, trying SAM... Error: cannot open alignment file

    This implies that it can't open the alignment files but i don't know why? When i examined the BAM files that were produced by TopHat, i noticed their icons look like they have been zipped (right click, properties also supports this theory), however i can't unzip them with gunzip (using command line nor GUI methods).
    Any ideas?
  • westerman
    Rick Westerman
    • Jun 2008
    • 1104

    #2
    Can you use 'samtools' can you read the BAM file? If not then indeed the file is not valid.

    Code:
    samtools view  ./home/richard/RNA_seq_analysis/run296_tophat/9-0GS_AGTCAA_run296_tophat/accepted_hits.bam | more

    Comment

    • Richard Barker
      Member
      • Apr 2012
      • 47

      #3
      Thanks for the advice, when i used 'samtools view' the file seemed to opened fine, there appears to be normal sequence information but there's also no tx at the beginning, i have to scroll down to see the sequence info... is that normal?
      So i assume that means the file is fine and the zipped appearance may be a red herring... Any other suggestions?

      Comment

      • westerman
        Rick Westerman
        • Jun 2008
        • 1104

        #4
        I am not sure what you mean by 'tx at the beginning'. When I look at a recently generated accepted_hits.bam file then I get the reads right at the start.

        Aside from that I have no concrete suggestions. Perhaps you can give us your full cuffdiff command line? That could help in debugging.

        Comment

        • Richard Barker
          Member
          • Apr 2012
          • 47

          #5
          My cuffdiff command line is

          cuffdiff -o cuffdiff_0 -b TAIR10_chr_all.fas -p 8 -L 9-0GS,10-0MS -u /home/richard/RNA_seq_analysis/run296_cuffmerge/run296_merged_asm/merged.gtf ./home/richard/RNA_seq_analysis/run296_tophat/9-0GS_AGTCAA_run296_tophat/accepted_hits.bam ./home/richard/RNA_seq_analysis/run296_tophat/10-0MS_AGTTCC_run296_tophat/accepted_hits.bam

          What i mean by "no tx at the beginning' is that the window produced by 'samtools view' is blank, unless i scroll down, then about 20% of the way down text encoding sequencing information begins...

          Comment

          • Richard Barker
            Member
            • Apr 2012
            • 47

            #6
            I tried using samtools to convert my BAM to SAM (samtools view -h -o 9-0GS_run296.sam accepted_hits.bam) to see if that makes any difference and got the following error...
            [bam_header_read] EOF marker is absent. The input is probably truncated.
            Why is there no EOF marker? I used tophat with normal/basic settings...

            Comment

            • westerman
              Rick Westerman
              • Jun 2008
              • 1104

              #7
              I am thinking that your file name is incorrect. You have a dot before '/home'. Can you do a
              Code:
              ls ./home/richard/RNA_seq_analysis/run296_tophat/9-0GS_AGTCAA_run296_tophat/accepted_hits.bam
              As versus
              Code:
              ls /home/richard/RNA_seq_analysis/run296_tophat/9-0GS_AGTCAA_run296_tophat/accepted_hits.bam
              Last edited by westerman; 08-14-2012, 07:51 AM. Reason: Forgot 'ls' in second code section

              Comment

              • Richard Barker
                Member
                • Apr 2012
                • 47

                #8
                Thanks, i think that helped as i now have a different issue.
                How do i think i now have an issue with the number if labels vs samples (see below).
                I'm trying to compare 2 files/treatments (for my first run at least).

                richard@ubuntu:~/RNA_seq_analysis/run297_cuffdiff$ cuffdiff -o cuffdiff_0 -b TAIR10_chr_all.fas -p 8 -L 9-0GS,10-0MS -u /home/richard/RNA_seq_analysis/run296_cuffmerge/run296_merged_asm/merged.gtf ls ./home/richard/RNA_seq_analysis/run296_tophat/9-0GS_AGTCAA_run296_tophat/accepted_hits.bam ls ./home/richard/RNA_seq_analysis/run296_tophat/10-0MS_AGTTCC_run296_tophat/accepted_hits.bam
                You are using Cufflinks v2.0.2, which is the most recent release.
                Error: number of labels must match number of conditions

                Comment

                • Richard Barker
                  Member
                  • Apr 2012
                  • 47

                  #9
                  I adjusted the coding after looking at other posts about the number of conditions which then brought me back to a invalid BAM file.

                  richard@ubuntu:~/RNA_seq_analysis/run297_cuffdiff$ cuffdiff -o cuffdiff_0 -b TAIR10_chr_all.fas -p 8 -L 9-0GS,10-0MS -u /home/richard/RNA_seq_analysis/run296_cuffmerge/run296_merged_asm/merged.gtf ls ./home/richard/RNA_seq_analysis/run296_tophat/9-0GS_AGTCAA_run296_tophat/accepted_hits.bam,./home/richard/RNA_seq_analysis/run296_tophat/10-0MS_AGTTCC_run296_tophat/accepted_hits.bam
                  You are using Cufflinks v2.0.2, which is the most recent release.
                  open: No such file or directory
                  File ls doesn't appear to be a valid BAM file, trying SAM...
                  Error: cannot open alignment file ls for reading

                  Comment

                  • westerman
                    Rick Westerman
                    • Jun 2008
                    • 1104

                    #10
                    I still think that your files are named incorrectly. Almost always having the dot in front of '/home' will not be the file name. Plus you have now put an 'ls' in there which is obviously not a file name either. In my previous post I wanted you to simply run the 'ls' (or dir on Windows -- but I suspect you are running Linux or MacOS) command to prove to me that ./home/etc. was a correct syntax for your files. The complete command line that you should run is as follows. Ignore any weird spacing that the forum may introduce.


                    Code:
                    cuffdiff -o cuffdiff_0 -b TAIR10_chr_all.fas -p 8 -L 9-0GS,10-0MS -u /home/richard/RNA_seq_analysis/run296_cuffmerge/run296_merged_asm/merged.gtf /home/richard/RNA_seq_analysis/run296_tophat/9-0GS_AGTCAA_run296_tophat/accepted_hits.bam,/home/richard/RNA_seq_analysis/run296_tophat/10-0MS_AGTTCC_run296_tophat/accepted_hits.bam

                    Comment

                    • Richard Barker
                      Member
                      • Apr 2012
                      • 47

                      #11
                      I removed the ls and the dot before the code and ran the script... i then tried copying and pasteing the sone above in just in case i had made a mistake but got the same response each time. However this is a new one!

                      richard@ubuntu:~/RNA_seq_analysis/run297_cuffdiff$ cuffdiff -o cuffdiff_0 -b TAIR10_chr_all.fas -p 8 -L 9-0GS,10-0MS -u /home/richard/RNA_seq_analysis/run296_cuffmerge/run296_merged_asm/merged.gtf /home/richard/RNA_seq_analysis/run296_tophat/9-0GS_AGTCAA_run296_tophat/accepted_hits.bam,/home/richard/RNA_seq_analysis/run296_tophat/10-0MS_AGTTCC_run296_tophat/accepted_hits.bam
                      \You are using Cufflinks v2.0.2, which is the most recent release.
                      Error: cuffdiff requires at least 2 SAM files

                      Comment

                      • westerman
                        Rick Westerman
                        • Jun 2008
                        • 1104

                        #12
                        Well, you do need two different conditions. As per the cuffdiff help, using the commas with your bam files is the following ...

                        Supply replicate SAMs as comma separated lists for each condition
                        Even if 9-0GS and 10-0MS are the same replicates then, at least for a test, take away the comma so that they do not act like replicates.

                        Comment

                        • Richard Barker
                          Member
                          • Apr 2012
                          • 47

                          #13
                          I removed the comma between the 2 input files and replaced it with a space and it now appears to working! The final script is below. Thanks for your help Rick

                          cuffdiff -o cuffdiff_0 -b TAIR10_chr_all.fas -p 8 -L 9-0GS,10-0MS -u /home/richard/RNA_seq_analysis/run296_cuffmerge/run296_merged_asm/merged.gtf /home/richard/RNA_seq_analysis/run296_tophat/9-0GS_AGTCAA_run296_tophat/accepted_hits.bam /home/richard/RNA_seq_analysis/run296_tophat/10-0MS_AGTTCC_run296_tophat/accepted_hits.bam

                          Comment

                          Latest Articles

                          Collapse

                          • SEQadmin2
                            Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
                            by SEQadmin2



                            Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

                            Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
                            ...
                            Yesterday, 09:55 AM
                          • SEQadmin2
                            New Genomics Technologies Take Aim at Long-Standing Limits
                            by SEQadmin2


                            Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

                            We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
                            ...
                            09-28-2026, 10:25 AM

                          ad_right_rmr

                          Collapse

                          News

                          Collapse

                          Topics Statistics Last Post
                          Started by SEQadmin2, Today, 10:52 AM
                          0 responses
                          8 views
                          0 reactions
                          Last Post SEQadmin2  
                          Started by SEQadmin2, Yesterday, 05:39 AM
                          0 responses
                          17 views
                          0 reactions
                          Last Post SEQadmin2  
                          Started by SEQadmin2, 10-13-2026, 09:56 AM
                          0 responses
                          15 views
                          0 reactions
                          Last Post SEQadmin2  
                          Started by SEQadmin2, 10-09-2026, 11:14 AM
                          0 responses
                          27 views
                          0 reactions
                          Last Post SEQadmin2  
                          Working...