diff --git a/ilus/main.py b/ilus/main.py index 4850fe1..ddd62c2 100644 --- a/ilus/main.py +++ b/ilus/main.py @@ -14,7 +14,7 @@ # Import specific functions of ilus from ilus.pipeline import ( - create_wgs_pipeline_command, create_wes_pipeline_command, WGS, + create_wgs_pipeline_command, create_capseq_pipeline_command, WGS, create_genotype_joint_calling_command, genotypeGVCFs, create_vqsr_command, variantrecalibrator ) @@ -93,7 +93,7 @@ def parse_commandline_args(): create_wgs_pipeline_command(commands) # The arguments for the whole pipeline of WES. - create_wes_pipeline_command(commands) + create_capseq_pipeline_command(commands) # The arguments for joint-calling process create_genotype_joint_calling_command(commands) @@ -131,8 +131,8 @@ def run_command(args): aione = {"config": load_config(args.sysconf)} WGS(args, aione) - # Create WES pipeline. WES could re-use the same processes of WGS. - elif args.command == "WES": + elif args.command == "capseq": + # Create pipeline for capture-sequencing. WES is one kind of capture sequencing. aione = {"config": load_config(args.sysconf)} WGS(args, aione, is_capture_seq=True) diff --git a/ilus/pipeline/__init__.py b/ilus/pipeline/__init__.py index f74e304..76bdb5a 100644 --- a/ilus/pipeline/__init__.py +++ b/ilus/pipeline/__init__.py @@ -1,6 +1,6 @@ from ._command_args import ( create_wgs_pipeline_command, - create_wes_pipeline_command, + create_capseq_pipeline_command, create_genotype_joint_calling_command, create_vqsr_command ) diff --git a/ilus/pipeline/_command_args.py b/ilus/pipeline/_command_args.py index d3b2c16..0c91102 100644 --- a/ilus/pipeline/_command_args.py +++ b/ilus/pipeline/_command_args.py @@ -145,25 +145,27 @@ def create_wgs_pipeline_command(commands): return wgs_cmd -def create_wes_pipeline_command(commands): +def create_capseq_pipeline_command(commands): """All the arguments for creating WES pipeline.""" # Todo: 思考要不要把这个参数改为 capseq,意思就是这个功能泛化为捕获测序数据分析流程,WES 只是捕获测序的一个特例? - wes_cmd = _add_germline_short_variant_discovery_argument( + capseq_cmd = _add_germline_short_variant_discovery_argument( commands.add_parser( - "WES", + "capseq", parents=[_parent_parser()], - help="Create pipeline scripts for WES (from FASTQ to genotype VCF).") + help="Create pipeline scripts for capture sequencing data (from FASTQ to genotype VCF). " + "Whole-exome sequencing (WES) belong to capture sequencing, which only captures " + "the coding regions of the genome.") ) - wes_cmd.add_argument( + capseq_cmd.add_argument( "--capture-interval", dest="interval", # WES capture region file (BED/Picard,1-based) type=str, required=True, - help="WES capture intervals: string or file (BED/Picard)" + help="Capture intervals, must be a file path: (BED/Picard) file" ) - return wes_cmd + return capseq_cmd def create_genotype_joint_calling_command(commands): diff --git a/ilus/pipeline/_germline_short_variant_discovery.py b/ilus/pipeline/_germline_short_variant_discovery.py index da9f675..c8f8b77 100644 --- a/ilus/pipeline/_germline_short_variant_discovery.py +++ b/ilus/pipeline/_germline_short_variant_discovery.py @@ -160,7 +160,8 @@ def _fetch_calling_variants_interval(kwargs, aione: dict = None, is_capture_seq: if is_capture_seq: # 如果是 capture sequence 比如 WES,把该文件记录起来,该 key 只为种情况而添加。 if (type(kwargs.interval) is not str) or (not Path(kwargs.interval).is_file()): - sys.stderr.write(f"[Error] --capture-interval must be a file, but got {kwargs.interval}\n") + sys.stderr.write(f"[Error] --capture-interval must be a file, " + f"but got {kwargs.interval}\n") sys.exit(1) aione["config"]["capture_interval_file"] = kwargs.interval diff --git a/tests/README.md b/tests/README.md index a7031f3..18d5495 100755 --- a/tests/README.md +++ b/tests/README.md @@ -46,5 +46,5 @@ ilus WGS -c -n my_wgs -C ilus_sys.yaml -I sample_fastq.list -O ./tmp --use-senti ilus WGS -c -n my_wgs -C ilus_sys.yaml -I sample_fastq.list -O ./tmp -f --interval human_GRCh38.calling_interval.bed ## WES -ilus WES -c -n my_wgs -C ilus_sys.yaml -I sample_fastq.list --capture-interval human_GRCh38.calling_interval.bed -O ./tmp -f -ilus WES -c -n my_wgs -C ilus_sys.yaml -I sample_fastq.list --capture-interval human_GRCh38.calling_interval.bed -O ./tmp -f --use-sentieon +ilus capseq -c -n my_wgs -C ilus_sys.yaml -I sample_fastq.list --capture-interval wes.test_interval.bed -O ./tmp -f +ilus capseq -c -n my_wgs -C ilus_sys.yaml -I sample_fastq.list --capture-interval wes.test_interval.bed -O ./tmp -f --use-sentieon