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
          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...
          Yesterday, 07:01 AM
        • seqadmin
          Current Approaches to Protein Sequencing
          by seqadmin


          Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
          04-04-2024, 04:25 PM

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by seqadmin, 04-11-2024, 12:08 PM
        0 responses
        58 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 04-10-2024, 10:19 PM
        0 responses
        54 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 04-10-2024, 09:21 AM
        0 responses
        45 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 04-04-2024, 09:00 AM
        0 responses
        55 views
        0 likes
        Last Post seqadmin  
        Working...
        X