0

I produced a bed file like this

Simple_repeat   KQ420259.1  45090   45150   (TTAT)n .   +
Simple_repeat   KQ420259.1  46815   46864   (TG)n   .   +
Simple_repeat   KQ420259.1  47062   47104   (GT)n   .   +
SINE/tRNA-Deu   KQ420259.1  49227   49290   AmnSINE2    .   +
Simple_repeat   KQ416943.1  112522  112609  (ATAC)n .   +
Simple_repeat   KQ416943.1  113250  113283  (ACA)n  .   +
Simple_repeat   KQ416943.1  113283  113358  (ACT)n  .   +
Simple_repeat   KQ416943.1  117308  117357  (AC)n   .   +
Simple_repeat   KQ416943.1  117357  117435  (ACAC)n .   +
Simple_repeat   KQ416944.1  117964  118025  (TATG)n .   +
DNA/TcMar       KQ416944.1  121083  121651  HSMAR1  .   +
Low_complexity  KQ416944.1  124929  124970  A-rich  .   +

and I would to eliminate all the rows containing KQ416943.1 . I don't know if exists a way to do it preserving the order. I'll appreciate your help. Thank you

Pierre
  • 34,472
  • 31
  • 113
  • 192
jonny jeep
  • 383
  • 3
  • 12
  • 2
    1) it's not a BED file. 2) search for `grep` – Pierre May 28 '19 at 10:37
  • why not? there are names, positions, strand. I think it is – jonny jeep May 28 '19 at 10:51
  • 2
    the 3 first columns of a BED file are: CHROM/START/END : https://genome.ucsc.edu/FAQ/FAQformat.html#format1 – Pierre May 28 '19 at 13:15
  • 3
    Possible duplicate of [Delete lines in a text file that contain a specific string](https://stackoverflow.com/questions/5410757/delete-lines-in-a-text-file-that-contain-a-specific-string) – zx8754 May 29 '19 at 07:14

1 Answers1

2

try this:

grep -v "KQ416943.1" yourfile.txt > output.txt
UtLox
  • 3,744
  • 2
  • 10
  • 13