Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • ea11
    Member
    • Jun 2015
    • 36

    Error using HTSeq

    Hi,

    I am relatively new to using Linux and to RNA-seq data analysis. I have been given some BAM files and been told to analyse the data in R. However, before I do that, I need to generate a count table for each sample. I am using HTSeq to do this but am hitting an error every time. Below is what I'm typing and the resulting error:

    $ htseq-count -s no 01_v2.sam "gencode.v21.annotation.gtf" > 01_v2.counts
    100000 GFF lines processed.
    200000 GFF lines processed.
    300000 GFF lines processed.
    400000 GFF lines processed.
    500000 GFF lines processed.
    600000 GFF lines processed.
    700000 GFF lines processed.
    800000 GFF lines processed.
    900000 GFF lines processed.
    1000000 GFF lines processed.
    1100000 GFF lines processed.
    1200000 GFF lines processed.
    1300000 GFF lines processed.
    1400000 GFF lines processed.
    1500000 GFF lines processed.
    1600000 GFF lines processed.
    1700000 GFF lines processed.
    1800000 GFF lines processed.
    1900000 GFF lines processed.
    2000000 GFF lines processed.
    2100000 GFF lines processed.
    2200000 GFF lines processed.
    2300000 GFF lines processed.
    2400000 GFF lines processed.
    2500000 GFF lines processed.
    2546594 GFF lines processed.
    Error occured when reading first line of sam file.
    Error: ("Malformed SAM line: MRNM == '*' although flag bit &0x0008 cleared", 'line 1 of file 01_v2.sam')
    [Exception type: ValueError, raised in _HTSeq.pyx:1321]


    head 01_v2.sam
    FCC64Y1ACXX:1:2311:16630:3201#GCCAATAT 81 chr10 60021 0 49M * 0 0 GCATCGGGGTGCTCTGGTTTTGTTGTTGTTATTTCTGAATGACATTTAC hiihhiiiiiiiiiiiiihdhiiiihhfiiihihhheggggeeeeebb_ NM:i:0 MD:Z:49
    FCC64Y1ACXX:1:2206:15375:73069#GCCAATAT 65 chr10 60124 0 49M * 0 0 GACAGGTCTTAATTGACGCGCTGTTCAGCCCTTTGAGTTCGGTTGAGTT bbbeeecegggggifhhfhiiiihhiiiiihhihfefcffhiefhcg_c NM:i:0 MD:Z:49
    FCC64Y1ACXX:1:2214:12808:62966#NCCAATAT 65 chr10 60154 0 49M * 0 0 CTTTGAGTTCGGTTGAGTTTTGGGTTGGAGAATTTTCTTCCACAAGGGA bbbeeeeeggggghihiggiiiiighiihhihhiiihiiihihiiiiig NM:i:0 MD:Z:49
    FCC64Y1ACXX:1:1102:13233:83253#GCCAATAT 65 chr10 60853 0 49M * 0 0 CGCAGATGGATAGATTACTGTTATTAGTTCTCATTTCATTGTTAATTTT bbbeeeeeggfgghiiiiiihhdhidgghfhihhiiihhhifhihhhhi NM:i:1 MD:Z:0T48
    FCC64Y1ACXX:1:1308:1800:34170#GCCAATAT 65 chr10 60930 30 49M * 0 0 TGCCTTTCAATATACCTTAGTGGAATTTATTAAATTTTCCTGGATGTCC bbbeeeeegggggiiiihiighheiiihghhiiiiiiiiiiiihiigii NM:i:0 MD:Z:49
    FCC64Y1ACXX:1:1307:19223:71708#GCCAATAT 65 chr10 61145 0 49M * 0 0 AATTCCACTTGGTTATATTGTCTAACTTTTTTCTAATTTTCTTTCATTT ^[\cccSaaccccd[bKQ[`Y^`[Y^`ecaddccd[accdccccdcbcd NM:i:0 MD:Z:49
    FCC64Y1ACXX:1:2206:7623:63302#GCCAATAT 81 chr10 62142 0 49M * 0 0 CTATTTGCACATATAGTTTTAATACCAATGACGTTAAAATGTATAACAC ghfcf^fhhiiiiiiiiiiiihggiiiiiihiiiiigggggeeeee_ab NM:i:0 MD:Z:49
    FCC64Y1ACXX:1:1216:3028:53281#NCCAATAT 65 chr10 62384 0 49M * 0 0 GTCCAGAGACAAATATTTTAAATATTGAAGTTGAAGACCTAAAAATGTG ___`ccdegeegehhhgfffhhhhXeeg_gghhhf_ddfghhfghaaa_ NM:i:1 MD:Z:0T48
    FCC64Y1ACXX:1:1207:12316:62577#GCCAATAT 81 chr10 66812 0 49M * 0 0 TGAAAGCATTCCCTTTGAGAATTGGAACAAGACGAGGAGACTACTCTCA iiiiiiiiihiihihhhifiiiiiiihhiiiiiiiigggggeceeebb_ NM:i:0 MD:Z:49


    I have also posted the first 5 lines of the file, but don't know what is wrong with line 1 of the file.

    If anyone can help, that would be greatly appreciated,

    Thanks
  • Michael.Ante
    Senior Member
    • Oct 2011
    • 127

    #2
    You may have a look at this biostars threat.

    Comment

    • ea11
      Member
      • Jun 2015
      • 36

      #3
      Thanks or the reply. I have looked at that post previously. So does that mean the only way to resolve the problem would be to realign the raw data? Is there no way around this?

      Its just that I was given the aligned BAM files as the alignment was done with an external company.

      Thanks

      Comment

      Latest Articles

      Collapse

      • 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
      • SEQadmin2
        Cancer Drug Resistance: The Lingering Barrier to Rising Survival
        by SEQadmin2



        Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

        There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
        07-08-2026, 05:17 AM
      • GATTACAT
        Reply to Nine Things a Sample Prep Scientist Thinks About Before Sequencing
        by GATTACAT
        Love this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
        07-01-2026, 11:43 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by SEQadmin2, 07-13-2026, 10:26 AM
      0 responses
      26 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 07-09-2026, 10:04 AM
      0 responses
      37 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 07-08-2026, 10:08 AM
      0 responses
      23 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 07-07-2026, 11:05 AM
      0 responses
      34 views
      0 reactions
      Last Post SEQadmin2  
      Working...