Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Kelly Lynn
    Junior Member
    • Jun 2011
    • 2

    #1

    what to do with this

    Hello,everyone. I'm suing: 'samtools view -c file.sorted.map chr1' to count the reads from the region "chr", but 'region"chr1" specifies an unknown reference name. Continue anyway.' is all I got. Anything wrong with the language or something else?
  • westerman
    Rick Westerman
    • Jun 2008
    • 1104

    #2
    What are your reference names? You obviously believe that 'chr1' is one of your reference names but maybe it is not? For example in one of the BAM files I have handy, the references are called 'Group2', etc. so I can do:

    samtools view -c wt.sr.bam Group2

    But if I do a

    samtools view -c wt.sr.bam chr1

    Then I get the error you described.

    In order to see your reference name I suggest doing a:

    samtools view file.sorted.map | more

    Comment

    • Kelly Lynn
      Junior Member
      • Jun 2011
      • 2

      #3
      thanks a lot westerman, the "chr1" is not my reference file, I guess the "chr1" string for hg19 refseq is enough for the region option? Should the 'region' be specified with the exactly same name as in the refseq, such like '>chr1_1:+' ? Or should I first pool the reference info into the memory then delivery them to the samtools view command, like:
      cat reference.fa|samtools view myfile.sorted.bam chr1?
      I tried in many ways, but still can not make this out.
      Last edited by Kelly Lynn; 06-11-2011, 09:18 AM.

      Comment

      • oiiio
        Senior Member
        • Jan 2011
        • 105

        #4
        Kelly Lynn,

        Sorry if this is an overly obvious question, but are you using a .bam or .sam file when you mention "file.sorted.map"? And if you are specifying a chromosome, then you must be using an indexed .BAM file.

        Supposing you are using something like file.sorted.bam (with the index file.sorted.bam.bai in the same directory), maybe you could try this for your command line:

        Code:
        samtools view -c file.sorted.bam chr1
        The term chr1 will work if that is indeed the name of the chromosome you are investigating. I just tried out the above command myself, and it worked fast and accurately.

        Comment

        • westerman
          Rick Westerman
          • Jun 2008
          • 1104

          #5
          Originally posted by Kelly Lynn View Post
          thanks a lot westerman, the "chr1" is not my reference file, I guess the "chr1" string for hg19 refseq is enough for the region option? Should the 'region' be specified with the exactly same name as in the refseq, such like '>chr1_1:+' ? Or should I first pool the reference info into the memory then delivery them to the samtools view command, like:
          cat reference.fa|samtools view myfile.sorted.bam chr1?
          I tried in many ways, but still can not make this out.
          Please try my last suggestion:

          samtools view file.sorted.map | more

          And paste into this thread the the first two output lines that contain reads. From my, admitted small, experience with hg19 your reference should be in the form 'chr1'. But we need to be sure. So pasting in those lines will give us a clue.

          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
            ...
            10-14-2026, 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, 10-22-2026, 11:13 AM
          0 responses
          27 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 10-22-2026, 10:48 AM
          0 responses
          20 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 10-15-2026, 10:52 AM
          0 responses
          36 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 10-14-2026, 05:39 AM
          0 responses
          43 views
          0 reactions
          Last Post SEQadmin2  
          Working...