error in editting binary file using sed command -
i trying remove lines in binary file(.bam) , make new 1 small example. tried sed command did not work , gave nothing. have this(when print using command : samtools view -h myfile.bam
)
@sq sn:5 ln:151834684 @sq sn:6 ln:149736546 @sq sn:7 ln:145441459 @sq sn:8 ln:129401213 @sq sn:9 ln:124595110 @sq sn:gl456210.1 ln:169725 @sq sn:gl456211.1 ln:241735 @sq sn:gl456212.1 ln:153618 @sq sn:gl456213.1 ln:39340 @sq sn:gl456216.1 ln:66673 @sq sn:mt ln:16299 @sq sn:x ln:171031299
and want this:
@sq sn:5 ln:151834684 @sq sn:6 ln:149736546 @sq sn:7 ln:145441459 @sq sn:8 ln:129401213 @sq sn:9 ln:124595110 @sq sn:mt ln:16299 @sq sn:x ln:171031299
here command used:
samtools view -h accepted_hits.bam | sed -v 's/sn:gl456210.1/' | samtools reheader - accepted_hits.bam > mybamfile.reheadered.bam
and when tried -e
instead of -v
gave error:
sed: -e expression #1, char 16: unterminated `s' command
do guys know how solve problem?
Comments
Post a Comment