Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problems with htseq-count reading bam file created by STAR

    Hi,

    Based on the STAR aligned bam files, I tried to generate the counts of RNA-seq data using htseq-count (version 0.5.1) tool by giving following command

    htseq-count -m intersection-nonempty input_bam_file gtf_file > Sample1_count.txt

    I am getting the following error

    Error occured when reading first line of sam file.
    Error: ('SAM line does not contain at least 11 tab-delimited fields.', 'line 1 of file input_bam_file')
    [Exception type: ValueError, raised in _HTSeq.pyx:1220]

    I am not certain if the problem is with STAR generated bam file or with htseq-count ?
    Any help is appreciated

    P.S: this is the STAR command given to create the bam file

    STAR --genomeDir genome_Dir/genome_mm10 --runThreadN 8 --readFilesIn sample_file --outFilterIntronMotifs RemoveNoncanonical --outSAMmode Full --outStd SAM | samtools view -bS - > Sample1.bam

  • #2
    htseq-count needs a SAM file, not a BAM file. Try it again with a SAM file. This can be generated with:

    Code:
    samtools view -h -o output.sam input.bam

    Comment


    • #3
      Originally posted by chadn737 View Post
      htseq-count needs a SAM file, not a BAM file. Try it again with a SAM file. This can be generated with:

      Code:
      samtools view -h -o output.sam input.bam
      Thanks it worked..

      Comment


      • #4
        Also to save time you can pipe that samtools conversion into htseq-count

        Code:
        samtools view <bam file> | htseq-count [options] - <gtf> > countsfile
        I forget if you need to write 'stdin' instead of the '-' for piped input. One of the two will work.
        /* Shawn Driscoll, Gene Expression Laboratory, Pfaff
        Salk Institute for Biological Studies, La Jolla, CA, USA */

        Comment

        Latest Articles

        Collapse

        • seqadmin
          Recent Advances in Sequencing Analysis Tools
          by seqadmin


          The sequencing world is rapidly changing due to declining costs, enhanced accuracies, and the advent of newer, cutting-edge instruments. Equally important to these developments are improvements in sequencing analysis, a process that converts vast amounts of raw data into a comprehensible and meaningful form. This complex task requires expertise and the right analysis tools. In this article, we highlight the progress and innovation in sequencing analysis by reviewing several of the...
          05-06-2024, 07:48 AM
        • seqadmin
          Essential Discoveries and Tools in Epitranscriptomics
          by seqadmin




          The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist...
          04-22-2024, 07:01 AM

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by seqadmin, 05-10-2024, 06:35 AM
        0 responses
        18 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 05-09-2024, 02:46 PM
        0 responses
        21 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 05-07-2024, 06:57 AM
        0 responses
        19 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 05-06-2024, 07:17 AM
        0 responses
        21 views
        0 likes
        Last Post seqadmin  
        Working...
        X