Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • biznatch
    Senior Member
    • Nov 2010
    • 124

    #1

    Bedtools -s (strandedness) not working

    The -s option isn't working for me with bedtools (v2.17.0). As a test I made two files each with only one line:

    file1.bed
    Code:
    chr1	100	200	name1	0	+
    file2.bed
    Code:
    chr1	100	200	name2	0	+
    Then used this command:
    Code:
    bedtools intersect -a ./file1.bed -b ./file2.bed -s
    And it reports no overlap. If I run the same command without the "-s" at the end it reports the overlap. Am I missing something obvious?
  • GenoMax
    Senior Member
    • Feb 2008
    • 7142

    #2
    $ bedtools intersect -s -a ./file1.bed -b ./file2.bed
    That seems to work. Guess options need to go before the the first file entry.

    Comment

    • biznatch
      Senior Member
      • Nov 2010
      • 124

      #3
      Originally posted by GenoMax View Post
      That seems to work. Guess options need to go before the the first file entry.
      Tried that already, it also doesn't work.

      Comment

      • GenoMax
        Senior Member
        • Feb 2008
        • 7142

        #4
        Originally posted by biznatch View Post
        Tried that already, it also doesn't work.
        It works for me. What OS are you using?
        Code:
        $ bedtools intersect -s -a ./file1.bed -b ./file2.bed
        chr1	100	200	name1	0	+
        Code:
        $ more p1.bed
        chr1	100	200	name1	0	-
        chr1	100	200	name1	0	+
        $ more p2.bed
        chr1	100	200	name2	0	+
        $ bedtools intersect -s -a ./p1.bed -b ./p2.bed
        chr1	100	200	name1	0	+
        $ bedtools intersect -s -v -a ./p1.bed -b ./p2.bed
        chr1	100	200	name1	0	-
        Last edited by GenoMax; 10-07-2013, 02:35 PM.

        Comment

        • biznatch
          Senior Member
          • Nov 2010
          • 124

          #5
          I think I figured it out. I'm using bedtools in an Ubuntu virtual machine but saved the files in Notepad++ in Windows. I think it's a newline character problem so the "+" at the end of the line isn't being read correctly. When I made new files in gedit they worked.
          Last edited by biznatch; 10-07-2013, 02:42 PM.

          Comment

          • GenoMax
            Senior Member
            • Feb 2008
            • 7142

            #6
            Easy to overlook that possibility. Good to hear it is working.

            Comment

            Latest Articles

            Collapse

            • SEQadmin2
              16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
              by SEQadmin2





              NGS has revolutionized clinical microbiology by offering new ways to identify and surveil pathogens without prior knowledge of the target. One popular approach is 16S rRNA and ITS amplicon sequencing, which targets specific microbial markers. But studies are increasingly incorporating shotgun metagenomics, a technique that sequences all DNA from a sample without targeting specific microbial markers. This approach allows more detailed taxonomic classification,...
              10-30-2026, 06:46 AM
            • 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

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by SEQadmin2, Yesterday, 07:59 AM
            0 responses
            13 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 11-05-2026, 09:25 AM
            0 responses
            32 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 11-03-2026, 11:54 AM
            0 responses
            45 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 10-28-2026, 09:57 AM
            0 responses
            171 views
            0 reactions
            Last Post SEQadmin2  
            Working...