A few bioinformatics utilities used on galaxy.hyphy.org.
Experimental library at the moment... use at your own risk!
Coming soon to pip/PyPI.
git clone https://github.com/stephenshank/galaxyhyphytools
cd galaxyhyphytools
python setup.py install
Coming soon to bioconda.
conda install -c stephenshank galaxyhyphytools
Plucks a region from a given FASTA file. Given input fasta with a single record:
####input.fasta
>input
ACGTACGT
run
ght pluck -i input.fasta -o plucked.fasta -s 1 -S 4 -d plucked
to obtain
>input plucked
CGT
See ght pluck --help
.
Horizontally stack/concatenate existing multiple sequence alignments. Given input fasta files
>record1
ACGTACGT
>record2
GCGCGCGC
>record3
AAAAAAAA
>record1
ACGTACGT
>record1
ATATATAT
>record3
CCCCCCCC
run
ght hstack -o stacked.fasta -d stacked -i first.fasta second.fasta
to obtain
>record1 stacked
ACGTACGTACGTACGT
>record2 stacked
GCGCGCGCATATATAT
>record3 stacked
AAAAAAAACCCCCCCC
See ght hstack --help
.
Filter a FASTA file according to various conditions. At present only a regex on the ID is supported. Given:
>B.1999
ACGTACGTACGTACGT
>C.2002
GCGCGCGCATATATAT
>B.2003
AAAAAAAACCCCCCCC
>B.2004
CCCCCCCCCCCCCCCC
>G.2007
AAAAAAAAAAAAAAAA
run
ght fastafilter -i input.fasta -o filtered.fasta -I ^B\.'
to obtain
>B.1999
ACGTACGTACGTACGT
>B.2003
AAAAAAAACCCCCCCC
>B.2004
CCCCCCCCCCCCCCCC
See ght fastafilter --help
.