Remove overlap data
2
0
Entering edit mode
7.1 years ago
Alex ▴ 50

Hello,

At present I have two files and want to remove some overlaps.

A file

chr1 transcript 156510 159981

chr1 transcript 156510 162275

chr1 transcript 156510 162275

chr4 transcript 979875 997688

chr5 transcript 983222 984521

B file

chr1 transcript 156670 159700

chr1 transcript 156410 162000

chr1 transcript 156510 16390

chr6 transcript 4744609 4745158

I want to obatin C file like this :

chr1 transcript 156670 159700

chr1 transcript 156410 162000

chr1 transcript 156510 16390

chr4 transcript 979875 997688

chr5 transcript 983222 984521

chr6 transcript 4744609 4745158

I am a new programmer and really need this result.

Thanks

Alex

sequence RNA-Seq • 1.4k views
ADD COMMENT
1
Entering edit mode
ADD COMMENT
0
Entering edit mode

well ,It seems not works well ,maybe I'm not good at bedtools software, I want to output the A file all information and B file not overlaps A file information .At last obtain a C file

ADD REPLY
1
Entering edit mode
ADD REPLY
0
Entering edit mode
7.1 years ago
Lila M ★ 1.2k

As Pierre suggest, you can use bedtools intersect -v "that only report those entries in A that have no overlap in B". Is that what you want? or also you can use the option -wao that "write the original A and B entries plus the number of base pairs of overlap between the two features"

ADD COMMENT
0
Entering edit mode

it's may can't obtain the ideal result,I want to obtain C file like this

A file

chr1 transcript 156510 159981

chr1 transcript 156510 162275

chr1 transcript 156510 162275

chr4 transcript 979875 997688

chr5 transcript 983222 984521

B file

chr1 transcript 156670 159700

chr1 transcript 156410 162000

chr1 transcript 156510 16390

chr6 transcript 4744609 4745158

**I want to obatin C file like this :

chr1 transcript 156670 159700

chr1 transcript 156410 162000

chr1 transcript 156510 16390

chr4 transcript 979875 997688

chr5 transcript 983222 984521

chr6 transcript 4744609 4745158

ADD REPLY
0
Entering edit mode

Well, in that case you can get the out file for bedtool and then you will merge with your original sample, remove the unique results and you will get it. You have to play with your files a bit to obtain the ideal result ;)

ADD REPLY

Login before adding your answer.

Traffic: 2747 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6