Skip to content

arendsee/regref

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stable Build Status

regref

Installation

pip3 install regref

You can access the CLI help messages with:

regref -h

Example

./regref.py test-data/z.tab '${2}' '${3}' < test-data/z.fna

z.fna is a FASTA file with mangled headers where all non-letter or number characters have been replaced with underscores.

z.tab is a table that contains the mangled names (in column 2) and the original names (in column 3).

The regref command reads the FASTA file from standard input and then replaces every occurrence of the mangled string with the original string.

The arguments '${2}' and '${3}' refer to columns in z.tab by column number.

regref will replace every occurrence of each pattern. The example below replaces the mangled string in a tree with a single-quoted original string.

./regref.py test-data/z.tab '${2}' "'\${3}'" < test-data/z.tre

About

Like sed, but reads pattern and replacement expressions from columns in a table

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages