TileSeq测序数据的分析脚本
TileSeqMut的Python项目详细描述
TileSeq突变计数包
此包用于解析用户提供的输入顺序文件(fastq)参数.csv文件。 这个管道的输出是每对fastq文件的变异计数。在
依赖关系
python 3.6/3.7/3.8 (tested mainly under py3.6)
R 3.4.4+
Bowtie2 Bowtie2-build
安装
alpha版本可通过运行以下命令获得:
python -m pip install TileSeqMut
如果您使用的是conda,则可以在安装软件包之前设置环境:
{cd5}
然后用pip install cigar
安装包cigar
。(有时cigar
在condas或
测试Pypi
,需要手动安装)
您还需要脚本csv2json.R
,该脚本可以通过安装来安装[https://github.com/jweile
/tileseqMave]。确保csv2json.R
可以在^{
执行
安装后,您可以运行程序包:
tileseq_mut -p ~/path/to/paramSheet.csv -o ~/path/to/output_folder -f ~/path/to/fastq_file_folder/ -name
name_of_the_run
示例:
- 此命令将分析文件夹中的fastq文件:
$HOME/tileseq_data/WT/
,并在$HOME/dev/tilseq_mutcount/output/
中创建前缀为MTHFR_test
的带有时间戳的输出文件夹(使用所有默认参数,见下文)
参数
- 运行
tileseq_mut --help
# Required: -p PARAM, parameter csv or json file (please see details in the input files section) -o OUTPUT, Output directory -f FASTQ, Path to fastq files you want to analyze (only required when you are running alignment) -n NAME, RUN_NAME # Optional: -h, --help list all the args -env ENVIRONMENT, Name of cluster you want to run this script (default= DC), you can pick from DC, BC2 or GURU. --skip_alignment, Skip alignment for this run. Alignment output already exist and the output path should be the output generated by a previous run -log LOG_LEVEL, Log level of the logging object: debug, info, warning, error, critical (default= debug) -r1, R1 SAM file -r2, R2 SAM file -at, Alignment time required (default= 8h) -mt, Mutation calling time required (default= 36h) -override, This flag is used when converting the parameter sheet (csf2json). Please provide this flag if you only have one replicate.
跳过对齐的示例:
tileseq_mut -p $HOME/dev/tilseq_mutcount/190506_param_MTHFR.csv -o /home/rothlab1/rli/dev/tilseq_mutcount/output
/190506_MTHFR_WT_2020-01-29-17-07-04/ --skip_alignment
在一对SAM\u文件上运行的示例
tileseq_mut -r1 /home/rothlab1/rli//dev/tilseq_mutcount/output/MTHFR_test_2020-03-19-11-2812/sam_files/45_S45_R1_001.sam
-r2
/home/rothlab1/rli//dev/tilseq_mutcount/output/MTHFR_test_2020-03-19-11-28-12/sam_files/45_S45_R2_001.sam -o /home/rothlab1/rli//dev/tilseq_mutcount/output/MTHFR_test_2020-03-19-11-28-12/MTHFR_test_2020-03-19-14-32-21_mut_count -p /home/rothlab1/rli//dev/tilseq_mutcount/paramsheets/190506_MTHFR_WT.csv --skip_alignment -n MTHFR_test
输入文件
/path/to/fastq/
-输入fastq文件的完整路径
parameters.csv
-CSV文件包含此运行的信息(请参见示例
here
).
此文件需要逗号分隔并以csv格式保存。在
输出文件
为每次运行创建一个输出文件夹。输出文件夹以name_time-stamp
命名
在每个输出文件夹中,将生成以下文件和文件夹:
./main.log
-用于对齐的主日志文件
./args.log
-此运行的参数
./ref/
-引用fasta文件和bowtie2索引
./env_aln_sh/
-提交对齐作业的Bash脚本
./sam_files/
-原始fastq文件的对齐输出和日志文件
./name_time-stamped_mut_count/
-每个样本中的突变计数保存在csv文件中
- `./main.log` - Main log file for mutation calling
- `./args.log` - command line arguments
- `./info.csv` - Meta information for each sample: sequencing depth, tile starts/ends and # of reads mapped outside of the targeted tile
- `./count_sample_*.csv` - Raw mutation counts for each sample. With meta data in header. Variants are represented in hgvs format
- `./env_mut_sh/` - Bash scripts for summitting the mutation count jobs
- `./sample_id.log` - Log file for each sample
count_sample\**.csv被传递到tileseqMave进行进一步分析
对齐
管道以参数文件中的序列作为引用,并对齐fastq文件 整个参考序列。这是用户在参数文件中指定的序列。在
对于每对fastq文件(R1和R2),管道向集群提交一个对齐作业。在文件夹env_sh
中,可以找到运行main.py
时提交给集群的所有脚本。在
使用Bowtie2
与以下参数进行对齐:
~/bowtie2 --no-head --norc --no-sq --local -x {ref} -U {r1} -S {r1_sam_file}
~/bowtie2 --no-head --nofw --no-sq --local -x {ref} -U {r2} -S {r2_sam_file}
突变呼叫
从每对sam文件中,我们计算每个样本的突变。在
我们首先过滤掉未映射到引用的读取或位于图块外部的读取。然后将其余的读取传递给count_mut.py
。请阅读wiki页面中关于如何使用雪茄字符串和MD:Z标记来调用突变。在
为了消除测序错误。我们应用后验概率截断。突变的后验概率使用SAM文件中提供的Phred分数计算。在
- 项目
标签: