Recent Posts

Pages: 1 ... 8 9 [10]
91
bedops / Re: bedops merge peaks function (bedops -m)
« Last post by AlexReynolds on September 14, 2014, 01:02:01 PM »
I accidentally deleted my response. I can't remember what I typed, but I think the following is a bit cleaner (one command instead of two).

Here's a way to get all "overlapping-only" elements with a one-liner:

$ bedops --merge elements.bed \
    | bedmap --count --echo-map --delim '\t' - elements.bed \
    | awk '$1>1' - \
    | cut -f2- - \
    | tr ';' '\n' \
    | sort-bed - \
    > overlapping-only.bed


In addition to doing it all without intermediate files, another nice thing about this approach is that this preserves ID and other fields in elements.bed. I think my previous approach may have stripped this information.

If you want the merged regions from these, just add another bedops --merge step at the end:

$ bedops --merge elements.bed \
    | bedmap --count --echo-map --delim '\t' - elements.bed \
    | awk '$1>1' - \
    | cut -f2- - \
    | tr ';' '\n' \
    | sort-bed - \
    | bedops --merge - \
    > overlapping-only-and-merged.bed


To get the set of elements that do not merge (those that are "disjoint"), you can use either of the above results:

$ bedops --not-element-of -1 elements.bed overlapping-only.bed > disjoint.bed
92
bedops / Re: bedops merge peaks function (bedops -m)
« Last post by sjn on September 12, 2014, 05:55:58 PM »
For the second of your questions, perhaps try:
bedops -e -1 file1.bed file2.bed > g1
bedops -e -1 file2.bed file1.bed > g2
bedops -m g1 g2 > answer2.bed

It's a good point on the technical wording of how --merge (-m) works.  We will update the documentation.
Thanks.
Shane
93
bedops / bedops merge peaks function (bedops -m)
« Last post by Bedopsi on September 04, 2014, 07:45:42 AM »
Hello,

I'm quite unfamiliar with bedops and interval operations in general, i was trying out the bedops functions on standard bed files and got confused about the --merge option output.
From the documentation it says:
6.1.1.3.8. Merge (-m, –merge)

The --merge operation flattens all overlapping and adjoining elements into contiguous regions:

,
So i was thinking that if I use 2 bed files, all intervals that appear in only one file, that is, have no overlap, would be left out.
However, when i look at the result, i see those non-overlapping intervals as in the original file, and for the overlapping ones, the full extension that covers both, as expected.

I probably missed some description on this, could you comment a bit?
And could you give some ideas on how to get only the overlapping intervals between sets, extended to the full peak range?

Thanks in advance,
Mafalda.
94
sort-bed / Re: Problem with multiple comments in a bed file
« Last post by pachkov on August 19, 2014, 12:21:23 AM »
Thank you both!

I do exactly what Alex suggested but it would be nice to get ignoring all comments in the sort-bed.

Best,

Mikhail
95
sort-bed / Re: Problem with multiple comments in a bed file
« Last post by sjn on August 18, 2014, 05:09:56 PM »
sort-bed only removes header lines that start with a '#' (or other supported header lines: see bedmap --help or docs for that list).  In this case, these are not all at the top and they won't be stripped.  It tries to read 'in' as a numeric start coordinate and dies a miserable death.

Alex's suggestion will work well for your input type.

Shane
96
sort-bed / Re: Problem with multiple comments in a bed file
« Last post by AlexReynolds on August 18, 2014, 04:36:31 PM »
Thanks for the report, which we will investigate.

In the meantime, you can also do this to strip comment lines and sort your file:

$ grep -v '^#' unsorted.bed | sort-bed - > sorted.bed
97
sort-bed / Problem with multiple comments in a bed file
« Last post by pachkov on August 18, 2014, 06:15:05 AM »
Hi again!

I have got rathe unusual bed file which confuses sort-bed.
This is how it looks like:

#Deleted in new
10      3100141 3100242 HISEQ:130:C2EWUACXX:8:2202:9761:39782   1       -
#Deleted in new
10      3100151 3100252 HISEQ:130:C2EWUACXX:8:2106:1494:66677   1       +
#Deleted in new


sort-bed says the following:

Non-numeric start coordinate.  See line 3 in tmp.bed.
(remember that chromosome names should not contain spaces.)

I think that this is a wrong behaviour. All lines starting with "#" should be skipped.
Is that right?

Best,

Mikhail
98
Feature Requests / Re: Support for Imprecise Indels
« Last post by AlexReynolds on May 23, 2014, 09:42:27 AM »
Can you post a link to a specification document that summarizes changes, that I could look at? Thanks!
99
Feature Requests / Support for Imprecise Indels
« Last post by farrell on May 23, 2014, 07:21:29 AM »
The latest vcf versions include support for IMPRECISE deletions and insertions. The length of a SV is determined by SVLEN in the INFO field rather than ALT and REF. The ALT field will instead have <DEL> or <INS> as a placeholder.

Could vcf2bed add support for this? It would be useful to find intersections with precise breakpoints in another vcf file.
100
bedops / Re: bedops tools launch problem
« Last post by AlexReynolds on May 22, 2014, 02:31:10 PM »
Can you provide some details about your setup? Specifically, what operating system and version you are running, as well as your Python setup? Thanks!
Pages: 1 ... 8 9 [10]