gonz_unmap.pl - unmap or remap identifiers/strings using a given id mapping
Usage: gonz_unmap.pl [OPTIONS] <map_file> <input_file> <output_file> gonz_unmap.pl will (un)map or remap identifiers of tables using a given id mapping. All input files are exptected to be tab-separated. Column numbers are zero-based. Examples: gonz_unmap.pl --from 0 --to 1 --col 0 map.tsv data.tsv data.unmapped.tsv # remaps column 0 (the 1st column) of data.tsv using the mapping of # column 0 -> column 1 in map.tsv and saves it to data.unmapped.tsv. OPTIONS: -?, --help show the full help with all options explained -k, --from -v, --to -m, --col=<NUMBER> --skip_na --comment=<REGEX> --keep -h, --header --filter=<REGEX> --na_prefix=<STRING> --na_suffix=<STRING> --multi
The column to match the ids against
If the from column has a match, output the id in column to.
from
to
The columns that should be mapped. Can be used multiple times to map multiple columns with the same mapping at the same time.
Do only output sucessfully mapped ids/strings.
(usually gonz_unmap.pl dies if a mapping fails)
gonz_unmap.pl
The data input has comments of the form <REGEX>, just copy it directly to the output.
<REGEX>
Do not replace the ids in the col-column, but add a new column after it with the mapped ids.
col
The data file has a header, just copy it directly to the output.
Prefilter the input data by <REGEX >
<REGEX
Prefix the original ids with <STRING> and take the prefixed version as mapped id.
<STRING>
Add the suffix <STRING> the original ids and take the suffixed version as mapped id.
If one id (from) maps to multiple ids (to), output all mappings. Default is to take the last encountered (from,to)-pair as mapping entry.
jw bargsten, <jwb at cpan dot org>
<jwb at cpan dot org>
To install Bio::Gonzales, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bio::Gonzales
CPAN shell
perl -MCPAN -e shell install Bio::Gonzales
For more information on module installation, please visit the detailed CPAN module installation guide.