Hi,
I have a BED file having entries from all chromosome and would like to remove chr1 while retaining all
other entires which start with chr11 chr19 and so on. When I use grep -v "chr1" it removes the other chromosomes as well which start with chr11 or chr19.
Is there a regular expression which I can use to avoid this?
Kindly help.
Hi, I have a BED file having entries from all chromosome and would like to remove chr1 while retaining all other entires which start with chr11 chr19 and so on
using grep is not a good choice. Because the word 'chr1' could be present in another column.
Instead of using generic tools, please use dedicated tools such as bedops for operations on bed files. In this case, function bedextract from bedops may be helpful.
Original poster says:
@genomax opps, updated.