pfenninglab / halLiftover-postprocessing

18 stars 4 forks source link

Keep only peaks with given chromosome name prefix #5

Closed csestili closed 2 years ago

csestili commented 2 years ago

This PR adds the optional flag -keepChrPrefix to orthologFind.py. This flag lets the user give a prefix, and mapped peaks are only kept if the chromosome name after mapping begins with the given prefix.

Before this PR, some peaks might map to somewhere other than a chromosome, e.g. this peak which mapped to JH584321.1:

JH584321.1  1454525 1455025 chr2:210477318-210477819    -1  .   -1  -1  -1  250

After this PR, when we pass the flag -keepChrPrefix chr, a mapped peak is kept only if its chromosome name starts with chr; all other peaks are discarded. If -keepChrPrefix is not passed, then orthologFind.py functions as before.