Helloo…I run bedtools intersect intervals (-wa option) using as input a bed file containing the genes of an organism and a bed file containing the common peaks i found between 2 MACS2 files. And with the bedtool intersect intervals essentialy i wanted to find if the are any genes which contain common peaks. The tool run but in the file it created, the names of the regions of the genes that had peaks where given new names. Why did that happen and what can i do to fix it?
It changed the names in column 4 (eg. from Peaxi162Scf00000g00013 to region_98):
Hi @maria22222
I expect renaming should happen when only overlapping portions of intervals are reported, but -wa option reports entire intervals. Out of curiosity I tried couple intersect tools, and both preserved the original names in the outputs
Heyy Igor…thank you so much for responding!!! Yours actually works perfect…I compared it to mine and found that we used the same tool parameters… the problem in mine seems to be that the genes bed file i imported was in interval format…and when i used the bedtools intersect intervals it converted to bed and for some reason it renamed the 4th column to “regions”…
I really dont understand though why it did that and how to prevent it…If you have any idea it would be really helpful!!! Thanksss
Hi @maria22222
Datatype can be specified during upload or changed later. Upload menu shows three boxes (the view varies in different upload options). The first one is for name, the second box if for datatype. Usually it is auto-detected, but you can specify it as “bed”. I guess a proper bed format needs six columns with strict order (search for BED format specification at UCSC Genome Browser site). I hope this helps.
Just in case, check the start positions. BED format uses zero offset, while intervals might use 1-offset.
Kind regards,
Igor
oops, I forgot to write about the second option, change of a datatype for a dataset in Galaxy. Click at Edit Attributes (pencil icon), in the middle window switch to Datatype tab in the middle window, and select an appropriate datatype in Assign Datatype.
Kind regards,
Igor