This is a test version of Biostars. For the public version, visit https://www.biostars.org.
add strand info to a bed file

Is there a script/tool that can add strand (+/-) information to the fourth column of a bed file? I have a bed file (first few lines below) of 45,000 targets each chromosome, start, and stop. Thank you :).

Target Bed

chr1    955542    955763
chr1    957570    957852
chr1    976034    976270
picard

1 answer

sed 's/$/\t+/' < input.bed > output.bed

Works great... thank you :)

As I am learning these techniques do you mind briefly explaining how this works? Thank you very much.

Log in to answer this question.