Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • filter overlapping regions

    Hi all,

    I have a file with chromosome start and stop positions (3 column file like bed file). I would like to filter overlapping positions. for eg,

    chr_1 100 500
    chr_1 200 650
    chr_1 2200 3000
    chr_1 5000 6500
    chr_1 5800 7500

    In the above file, I would like to remove the second and last line from the file, since it is overlapped in the previous regions. Can anybody please provide suggestions to do this?
    Thanks!

  • #2
    Using R and given a GRanges object named "bed":

    Code:
     o <- findOverlaps(bed, bed)
    o <- o[queryHits(o) > subjectHits(o)]
    bed <- bed[-queryHits(o)]

    Comment

    Latest Articles

    Collapse

    • seqadmin
      Exploring Human Diversity Through Large-Scale Omics
      by seqadmin


      In 2003, researchers from the Human Genome Project (HGP) announced the most comprehensive genome to date1. Although the genome wasn’t fully completed until nearly 20 years later2, numerous large-scale projects, such as the International HapMap Project and 1000 Genomes Project, continued the HGP's work, capturing extensive variation and genomic diversity within humans. Recently, newer initiatives have significantly increased in scale and expanded beyond genomics, offering a more detailed...
      Today, 06:43 AM
    • seqadmin
      Best Practices for Single-Cell Sequencing Analysis
      by seqadmin



      While isolating and preparing single cells for sequencing was historically the bottleneck, recent technological advancements have shifted the challenge to data analysis. This highlights the rapidly evolving nature of single-cell sequencing. The inherent complexity of single-cell analysis has intensified with the surge in data volume and the incorporation of diverse and more complex datasets. This article explores the challenges in analysis, examines common pitfalls, offers...
      06-06-2024, 07:15 AM

    ad_right_rmr

    Collapse

    News

    Collapse

    Topics Statistics Last Post
    Started by seqadmin, 06-21-2024, 07:49 AM
    0 responses
    224 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 06-20-2024, 07:23 AM
    0 responses
    231 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 06-17-2024, 06:54 AM
    0 responses
    231 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 06-14-2024, 07:24 AM
    0 responses
    28 views
    0 likes
    Last Post seqadmin  
    Working...
    X