Question: What To Do About Negative Strand Coordinates In A Chip-Seq Peak Calling Analysis
0
gravatar for kanwarjag
6.1 years ago by
kanwarjag950
United States
kanwarjag950 wrote:

I ran MACS fro calling Chipseq and bed file showed ch1 -41 256 . Hiow can I convert into positive coordinates as the downstream analysis tools are giving error that it cannot be negative.

Thanks

coordinates • 2.6k views
ADD COMMENTlink modified 6.1 years ago by Sukhdeep Singh9.7k • written 6.1 years ago by kanwarjag950
2
gravatar for biorepine
6.1 years ago by
biorepine1.4k
Spain
biorepine1.4k wrote:

As Istvan said remove them.

Try this (It gives all the regions that have no negative numbers on the first strand)

awk '{if ($2>=0) print $0}' input.bed >> output.bed
ADD COMMENTlink modified 6.1 years ago • written 6.1 years ago by biorepine1.4k
2
gravatar for Sukhdeep Singh
6.1 years ago by
Sukhdeep Singh9.7k
Netherlands
Sukhdeep Singh9.7k wrote:

Dont remove the peaks, replace the -ve co-ordinates by 0.

This comes under off end chromosome reads. Either use an established tool like bedclip.

Another post explaining it http://biofeed.tumblr.com/post/16758640444/ngs-chip-seq-bedclip-to-clip-out-off-end-chromosome

or use this awk script, it replaces -ve coordinates in 2nd column by 0, but doesn't removes them.

awk '{ if( $2 ~ /^-/ ){sub($2,0, $2); print $0;}else{print $0}}' file.bed >out.bed

Cheers

ADD COMMENTlink modified 6.1 years ago • written 6.1 years ago by Sukhdeep Singh9.7k

Sukhdeep Could you please check with in above URL link for bedclip is not working

ADD REPLYlink written 6.1 years ago by kanwarjag950

Check again, I was editing it at the same time :)

ADD REPLYlink written 6.1 years ago by Sukhdeep Singh9.7k
1
gravatar for Istvan Albert
6.1 years ago by
Istvan Albert ♦♦ 80k
University Park, USA
Istvan Albert ♦♦ 80k wrote:

This is most likely a data processing mistake where someone corrected the binding location by shifting the 5' end to indicate midpoints but forgot to account for data on the reverse strand that may have been closer than a half fragment width to the chromosome start. Similarly you may have start sites on the positive strand that are past the chromosome ends but those don't stand out that much.

Filter out this data (remove them).

ADD COMMENTlink modified 6.1 years ago • written 6.1 years ago by Istvan Albert ♦♦ 80k
1
gravatar for Madelaine Gogol
6.1 years ago by
Madelaine Gogol5.0k
Kansas City
Madelaine Gogol5.0k wrote:

I would set the -41 to 0 rather than remove the peak. And for those that go beyond the end of the chromosome, set to the end of the chromosome.

ADD COMMENTlink written 6.1 years ago by Madelaine Gogol5.0k
1
gravatar for Ian
6.1 years ago by
Ian5.4k
University of Manchester, UK
Ian5.4k wrote:

The wig file from MACS sometimes has a similar issue. If you convert wig to bigWig (using UCSC's wigToBigWig) then be sure to use the '-clip' flag.

ADD COMMENTlink written 6.1 years ago by Ian5.4k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 641 users visited in the last hour