BedOverlapName: Difference between revisions
From genomewiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
Add overlapping bedname from second bed: | |||
<pre> | <pre> | ||
#!/bin/bash | #!/bin/bash | ||
PREFIX=$3 | PREFIX=$3 | ||
overlapSelect $1 $2 -mergeOutput stdout -dropped=stdout| cut -f 1,2,3,4,8 | gawk '{OFS="\t";print $1,$2,$3,$4" | overlapSelect $1 $2 -mergeOutput stdout -dropped=stdout| cut -f 1,2,3,4,8 \ | ||
| gawk '{OFS="\t";print $1,$2,$3,$4",'$PREFIX'"$5}' | |||
</pre> | </pre> | ||
example: | |||
<pre> | |||
bedOverlapName randomFeatures.bed geneAnnotation.bed EXON_ | | |||
bedOverlapName stdin conservedRegions.bed CR_ | | |||
bedOverlapName stdin UTRs UTR_ | |||
</pre> | |||
will annotate the bed names with various additional information, each seperated by a comma | |||
[[Category:User Developed Scripts]] | [[Category:User Developed Scripts]] |
Latest revision as of 21:41, 26 October 2006
Add overlapping bedname from second bed:
#!/bin/bash PREFIX=$3 overlapSelect $1 $2 -mergeOutput stdout -dropped=stdout| cut -f 1,2,3,4,8 \ | gawk '{OFS="\t";print $1,$2,$3,$4",'$PREFIX'"$5}'
example:
bedOverlapName randomFeatures.bed geneAnnotation.bed EXON_ | bedOverlapName stdin conservedRegions.bed CR_ | bedOverlapName stdin UTRs UTR_
will annotate the bed names with various additional information, each seperated by a comma