Provide several simple bioinformatic scripts
This project was written by a master student who studied under Dr. Wang Qiyao's supervision. This project contains several simple bioinformatic and sequence operating scripts and will not update nor provide support when this student is graduated.
The project contains 4 modules: Sequence_operate
, TIS
, ChIP_seq
and RNA_seq
. For detailed usage, users can refer to Usage.
The easiest way to install WangLab in through PyPI. Please check the INSTALL document for detail.
In general, you can install through PyPI as pip install WangLab
. To use virtual environment is highly recommended. Or you can install after unzipping the released package downloaded from Github, then place scripts into corresponding folders of specific python environment.
See Sequence_operate, ChIP_seq, TIS, RNA_seq in docs
Here are examples of how to use subcommands in different modules.
wanglab extract_seqs -i pos.txt -r ref.fa -o out1.fa
In this example, pos.txt contain 3 columns, each represent name ,start ,end. ref.fa is contain a single sequence. The program will extract sequences between start and end, and output to out1.fa.
wanglab extract_seqs -i names.txt -r seqs.fa -o out2.fa
In this example, names.txt contain 1 column, which is the names that will be extracted. seqs.fa contain several sequences. The program will extract sequences whose names are in names.txt, and output to out2.fa
wanglab calc_content -i pos.txt -r ref.fa -o out3.txt
In this example, pos.txt and ref.fa are exactly the same as in extract_seqs
. The program will calculate GC content of each extracted sequences and output to out3.txt
wanglab file_merge -d ./input_files/ -f fasta -o out4.fa
In this example, input_files is a directory that contains several fasta files. The program will merge all fasta files in input_files directory and output to out4.fa
wanglab ossutil -conf config.txt
In this example, config.txt contains information used to download NGS data through oss-util, i.e., AccessKeyId
, AccessKeySecret
, OSS_path
, endpoint_path
and local_dir
. The former four are given by company and local_dir
is the directory that downloaded files are stored.
Note: To use this subcommand, users need to manually install oss-util.
Start with fq.gz files, the following examples are a common workflow of TIS analysis.
wanglab cutadapt -d . -p Tn5 -t tn-seq
In this example, all fq.gz files are in the current folder .
and is specified by -d
. Also, -p
and -t
are used to specify tn-seq and plasmid Tn5. This step will remove 3' and 5' adaptor sequences of raw data.
wanglab bowtie -d . -r ./ref.fa -@ 4 -t tn-seq
In this example, all trimmed files generate by cutadapt
are still in the current folder, so we set -d
as .
. Also, we use -r
to set the path of the reference genome file ref.fa
, whose first line (i.e. reference sequence name) is Contig00001
will be used later. -@
is used to make this process faster, and again, we set -t
as tn-seq
to specify data type.
This step will map trimmed reads to the reference genome.
wanglab count_reads -d . -i ./annot.gff -c Contig00001 -r "ID=(.+?);" -l 4703168
In this example, all SAM files generated by bowtie
are in the current folder, which is specified by -d .
.Similarly, gff formated annotation file annot.gff
was specified by -i
. Contig00001
, which has been mentioned in bowtie
, is also the first column in annot.gff
. Then, we use -r
to set a regular expression ID=(.+?);
to extract the feature name between ID=
and ;
. Finally, -l
is set as 47603168
, which means the region between the end of the last feature and 47603168 are the last one we will count reads.
This step will yield a table that contains read counts of every features.
Note: The 3rd column of annot.gff
should be CDS.
wanglab combine_reads -d .
Finally, we combine all the csv files in the current folder .
set by -d
and export one excel file.
wanglab cutadapt -d . -t chip-seq
In this example, all fq.gz files are in the current folder .
and is specified by -d
. Also, -t
is used to specify chip-seq. This step will remove 3' adaptor sequence of raw data.
wanglab bowtie -d . -r ./ref.fa -@ 4 -t chip-seq
In this example, all trimmed files generate by cutadapt
are still in the current folder, so we set -d
as .
. Also, we use -r
to set the path of the reference genome file ref.fa
. -@
is used to make this process faster, and again, we set -t
as chip-seq
to specify data type.
This step will map trimmed reads to the reference genome, and convert sam
files to bam
files, which is much smaller. Also, the program will sort bam
files and generate index files for visualization by other tools like IGV.
wanglab macs -t ./treat.bam -c ./control.bam -l eib202 --keep-dup all
In this example, treatment and control files set by -t
and -c
were used to call peak using macs3 callpeak. -l
is set as eib202
to search the genome length of eib202 and use in macs3 program. Also, we set --keep-dup
as all
to keep all reads.
Note: The macs
subcommand has not enabled most parameters provided by macs3 callpeak
. Thus, it is recommended to directly use macs3 callpeak
.
23.12.21
- Write docs of TIS and example usage in README.md
- Write docs of ChIP-seq and example usage in README.md
23.12.20
- Write docs of Sequence_operate
- Write example usage in README.md
23.12.19
- Enable installation using PyPI
- Test Sequence_operate module, the following need to be fixed: primer-generator, primer_blast, qPCR
- Test TIS module.
- Test ChIP-seq module.
- Fix: primer-generator, primer_blast, qPCR
- Test RNA_seq
- Write doc of usage.