In many cases, the scaffolds and contigs are not assembled to pseudo-molecules. The chromosome breaks and labels of scaffolds and contigs will be stacked up. Here, I add a new option --remove, to remove the chromosome breaks and labels from the query genome (--remove=q) or from the subject genome (--remove=s) or from both of them (--remove=qs).
I think the option is very useful and make the script more flexible :)
chr_remover.py:
This script aims to remove the specified chromosome(s) in bed and pep file. It can remove a chromosome or a set of chromosomes by using a regular expression.
For example:
There are chromosomes named "unknown" and "_random" in the grape genome (the dotplot example in README.rst). Sometimes we don't need them. This script can remove them from bed and pep file. If I want to remove all "_random" chromosomes, just do this:
python chr_remover.py Vvi.bed Vvi.pep random
If I want to remove chr1 but not remove chr10 - chr19, just do this:
python chr_remover.py Vvi.bed Vvi.pep chr1$
This script uses argparse, if you don't like it, I can rewrite it using optparse
a new option
--remove
:In many cases, the scaffolds and contigs are not assembled to pseudo-molecules. The chromosome breaks and labels of scaffolds and contigs will be stacked up. Here, I add a new option
--remove
, to remove the chromosome breaks and labels from the query genome (--remove=q
) or from the subject genome (--remove=s
) or from both of them (--remove=qs
).I think the option is very useful and make the script more flexible :)
chr_remover.py:
This script aims to remove the specified chromosome(s) in bed and pep file. It can remove a chromosome or a set of chromosomes by using a regular expression.
For example: There are chromosomes named "unknown" and "_random" in the grape genome (the dotplot example in
README.rst
). Sometimes we don't need them. This script can remove them from bed and pep file. If I want to remove all "_random" chromosomes, just do this:If I want to remove chr1 but not remove chr10 - chr19, just do this:
This script uses
argparse
, if you don't like it, I can rewrite it usingoptparse
README.rst: