Skip to content

snailQH/RenameCHGenomicsFilename

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RenameCHGenomicsFilename


1. Decription

RenameCHGenomicsFilename is designed for rename fastq.gz files generated by CloudHealth Genomics.

The rules of fastq.gz files : [runID]_[machineId][flowcellID]_[CHGID]-[LibName]-[SampleName]-[Barcode]_[LaneId]_[ReadNum].fastq.gz

It looks like this: S0001_01A_CHG000000-LIBNAME-SAMPLENAME-CCGGTTAA_L008_R2.fastq.gz

Some custumors do not want to get the fastq file in this style names. Some donot want the CHGID appears in the names, or LibName,SampleName,Barcode,LaneId.

So RenameCHGenomicsFilename is created.RenameCHGenomicsFilename is a golang based app.


2. Usage

RenameCHGenomicsFilename can be run in both windows/linux OS, or anyother platforms which golang support. Help Information for RenameCHGenomicsFilename:

RenameCHGenomicsFilename
A fastq.gz renamer from Cloudhealth Genomics, avaliable command : 
        (1)rename;
        (2)rebuilddir;
Please use help for details

Author: Qinghui Li
Email: liqh@cloudhealth99.com
Company: CloudHealth Genomics

Usage:
  RenameCHGenomicsFilename [flags]
  RenameCHGenomicsFilename [command]

Available Commands:
  help        Help about any command
  rebuild     re-build the structure of the delivering fastq files
  rename      rename is used for rename fastq file(s) to user specified stype
  version     Print the version number of RenameCHGenomicsFilename

Flags:
  -h, --help   help for RenameCHGenomicsFilename

Use "RenameCHGenomicsFilename [command] --help" for more information about a command.
```language

NOTICE: all the command can by in short or long parameters,like -h or --help.

2.1 rename module

Help information for rename module,by typing RenameCHGenomicsFilename rename -h

rename is used for rename fastq file(s) to user specified stype, avaliable Parameters: 
        (1)-marker :the region you want to remove from the samplenames[default:"4"]
                0: remove RunId,flowcellID,CHGID
                1: remove CHGID
                2: remove LibName
                3: remove SampleName
                4: remove Barcode
                5: remove LaneId
                12: remove CHGID & LibName
                14: remove CHGID & Barcode
                124: remove CHGID & LibName & Barcode
        (2)-dir :directory of the fastq files. eg: /online/projects/C150001-P001 [default:"./",means current dir,for linux OS]
        Any problem please contact  Qinghui Li  via liqh@cloudhealth99.com

Usage:
  RenameCHGenomicsFilename rename [flags]

Flags:
  -d, --dir string   specify a (relative/abs) path to fastq files (default "./")
  -h, --help         help for rename
  -m, --marker int   specify a marker to remove from filename[0/1/2/3/4/5/12/14/124]:chg id/original lib name/original samplename/barcode/lane id/CHGID & LibName/CHGID & Barcode/CHGID & LibName & Barcode (default 4)

2.2 rebuild module

Help information for rename module,by typing RenameCHGenomicsFilename rebuild -h

re-build the structure of the delivering fastq files,including fq files,md5 files, dir name, et.al.

Usage:
  RenameCHGenomicsFilename rebuild [flags]

Flags:
  -c, --customerid string   customer id , determined the style of fastq files structure. 
                Please input the correct customerid, like: C150001,C150003
  -d, --dir string          specify a (relative/abs) path to projectdir,like C150003-P999
  -h, --help                help for rebuild
  -p, --projectid string    projectid of the current delieverying (default "all")

3. Download

git clone https://github.com/snailQH/RenameCHGenomicsFilename.git
cd RenameCHGenomicsFilename
chmod 777 RenameCHGenomicsFilename

4. What's New

  • 20170920 update the program with a new CLI cobra and update a new function rebuild ,which aims to rebuild the structure of fastq files into the style defined by custumers-self.

5. How ro run

1. run the app from source code:

You need to install golang before run from the source code.

go run main.go rename -d /online/projects/C170001-P001 -m 5 #remove the LaneId from filename[/online/projects/C170001-P001]

2. run the app in linux os:

rename:

./RenameCHGenomicsFilename rename -d /online/projects/C170001-P001 -m 5 //remove the LaneId from filename[/online/projects/C170001-P001]

rebuild:

./RenameCHGenomicsFilename rebuild -d /online/projects/C170001-P001 -p C170001-P001 -c C170001 //rebuild all the fastq files according to the style provided by customer C170001

3. run the app in windows os:

RenameCHGenomicsFilename.exe rename -d D:\\C170001-P001 -m 5 //remove the LaneId from filename[D:\\C170001-P001]

Warning: Run the RenameCHGenomicsFilename rename can rename all the *fastq.gz files who have he same name pattern with the CHG *fastq.gz files which may affect the irrelevant files.

About

Rename fastq files from CloudHealth Genomics

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages