update January 4, 2019
NAME
bl_alias.py - Given a series of
paired-end read filenames, replace the leftmost common string with
a specified string.
SYNOPSIS
bl_alias.py
filename target [newname]
DESCRIPTION
For each file whose name begins with target, create a
symbolic link to target whose name begins with newname. The
purpose of this script is to make it easy for users to work with
files that have long, complex names using symbolic links with
short names. The motivation for this script is working with
sequencing read files that have long names with flow cell specific
references. In the ideal, the links are made to the initial
sequencing read files, and all subsequent files in the pipeline
can use the short names.
filename
- full name of file to which the link should be made
target - A substring of the filename to be replaced
newname - A substring to replace the target. If empty, the
target is simply deleted from the name.
EXAMPLE
If the target file is
HI.4183.005.Index_12.450-cont-2_R1.fastq.gz then
bl_alias.py
HI.4183.005.Index_12.450-cont-2_R1.fastq.gz
HI.4183.005.Index_12.450 Zm450
will create a link named Zm405-cont-2_R1.fastq.gz, pointing to the
target file.
If newname is not provided, the target string will simply be
omitted from the name of the link.
bl_alias.py
HI.4183.005.Index_12.450-cont-2_R1.fastq.gz
HI.4183.005.Index_12.450
would create a link named 450-cont-2_R1.fastq.gz
AUTHOR
Dr. Brian Fristensky
Department of Plant Science
University of Manitoba
Winnipeg, MB Canada R3T 2N2
brian.fristensky@umanitoba.ca
http://home.cc.umanitoba.ca/~frist