Entering edit mode
                    8.4 years ago
        BehMah
        
    
        ▴
    
    50
    Hi All, I have a bed file (annotation) with a bug throughout; the last 2 columns ARE NOT MATCHED in number of blocks ($5 has 4 blocks but $6 has 3) in some rows. How can I remove these lines having this unmatched columns. Thank you guys
  input:
  chr2   1627   4677   +     1,4,92,30    0,19,11
  chr2   2643   6698   +     10,42,9      0,14
  chr3   1327   4377   +     12,32        0,11
  chr4   4143   6698   +     64,43,23     0,24,51
  desired:
   chr3  1327   4377   +     12,32        0,11
   chr4  4143   6698   +     64,43,23     0,24,51
Dear BehMah. Could you please share with a few more lines of the original file and another snipped with desired result after data is fixed (make it manually). So we can understand exactly what you are looking for. Thank you.
More explenation:
I want to extract sequences of the coordinates but as Exon sizes ($5) are different from exon offsets($6) in numbers, bedtools doesn't give me all the sequences
Thank you all 5heikki ,Petr, jmzeng1314 for your awesome codes