이 페이지에서는 Variant Transforms 도구의 VCF 파일 전처리기를 사용하여 VCF 파일을 검증하는 방법을 설명합니다. 전처리기를 독립형 검증기로 실행할 수도 있고, VCF 파일을 BigQuery로 로드 및 변환할 때 도우미로 실행할 수도 있습니다.
VCF 파일 전처리기 개요
VCF 파일 전처리기는 VCF 파일을 포함하는 데이터세트를 검증하여 파일 간의 불일치를 식별합니다. 전처리기는 BigQuery에 데이터를 로드할 때 이러한 불일치를 보고하고 제거를 시도합니다. 전처리기는 형식이 잘못된 파일을 다룰 때와 같이 불일치를 제거할 방법을 판단할 수 없는 경우 사용자가 직접 수정할 방법을 제공합니다.
전처리기를 실행하면 세 가지 유형의 불일치를 식별하는 보고서가 생성됩니다.
불일치 | 설명 |
---|---|
(기본) 헤더 충돌 | 서로 다른 VCF 파일에서 같은 필드의 정의가 서로 다른 경우입니다. 이러한 불일치는 흔하게 나타납니다. 보고서는 다음 사항을 나열합니다.
|
(선택사항) 형식이 잘못된 변이 레코드 | VCF 파서가 파싱할 수 없는 잘못된 형식의 레코드가 있는 경우입니다. 보고서는 다음 사항을 나열합니다.
|
(선택사항) 추론된 헤더 | 필드의 다음 문제 중 하나를 나타냅니다.
|
전처리기 실행
필요한 모든 바이너리와 종속 항목이 설치된 Docker 이미지를 사용하여 도구를 실행할 수 있습니다. 대량의 파일을 전처리하는 경우 전처리기 도구로 대량 입력 처리를 참조하세요.
Docker 이미지를 사용하여 도구를 실행하려면 다음 단계를 완료합니다.
다음 스크립트를 실행하여 전처리기를 시작합니다. 변수를 Google Cloud 프로젝트의 관련 리소스로 대체합니다.
\#!/bin/bash \# Parameters to replace: \# The PROJECT_ID is the name of the GCP project that contains your BigQuery dataset. GOOGLE_CLOUD_PROJECT=PROJECT_ID INPUT_PATTERN=gs://BUCKET/*.vcf REPORT_PATH=gs://BUCKET/report.tsv RESOLVED_HEADERS_PATH=gs://BUCKET/resolved_headers.vcf TEMP_LOCATION=gs://BUCKET/temp COMMAND="vcf_to_bq_preprocess \ --input_pattern ${INPUT_PATTERN} \ --report_path ${REPORT_PATH} \ --resolved_headers_path ${RESOLVED_HEADERS_PATH} \ --report_all_conflicts true \ --temp_location ${TEMP_LOCATION} \ --job_name vcf-to-bigquery-preprocess \ --runner DataflowRunner" docker run -v ~/.config:/root/.config \ gcr.io/cloud-lifesciences/gcp-variant-transforms \ --project "${GOOGLE_CLOUD_PROJECT}" \ --zones us-west1-b \ "${COMMAND}"
Cloud Storage 버킷에서 VCF 파일의 위치를 지정할 때 단일 파일을 지정하거나 와일드 카드(
*
)를 사용하여 여러 파일을 한 번에 로드할 수 있습니다. 허용되는 파일 형식에는 GZIP, BZIP, VCF가 있습니다.TEMP_LOCATION
디렉토리는 도구를 실행하는 데 필요한 임시 파일을 저장하는 데 사용됩니다. 쓰기 액세스 권한이 있는 Cloud Storage 디렉터리면 됩니다.데이터 크기와 같은 여러 요인에 따라 작업을 완료하기까지 몇 분에서 1시간 이상 걸릴 수 있습니다.
출력 예
다음 예에서는 1000 Genomes 데이터세트에 대해 전처리기를 실행할 때 생성되는 보고서를 보여줍니다.
Header Conflicts
ID | Category | Conflicts | File Paths | Proposed Resolution |
---|---|---|---|---|
GL | FORMAT | num=None type=Float | gs://genomics-public-data/1000-genomes/vcf/ALL.chr13.integrated_phase1_v3.20101123.snps_indels_svs.genotypes.vcf | num=None type=Float |
gs://genomics-public-data/1000-genomes/vcf/ALL.chr17.integrated_phase1_v3.20101123.snps_indels_svs.genotypes.vcf | ||||
gs://genomics-public-data/1000-genomes/vcf/ALL.chr21.integrated_phase1_v3.20101123.snps_indels_svs.genotypes.vcf | ||||
gs://genomics-public-data/1000-genomes/vcf/ALL.chr8.integrated_phase1_v3.20101123.snps_indels_svs.genotypes.vcf | ||||
gs://genomics-public-data/1000-genomes/vcf/ALL.chrX.integrated_phase1_v3.20101123.snps_indels_svs.genotypes.vcf | ||||
num=3 type=Float | gs://genomics-public-data/1000-genomes/vcf/ALL.wgs.integrated_phase1_v3.20101123.snps_indels_sv.sites.vcf | |||
GQ | FORMAT | num=1 type=Float | gs://genomics-public-data/1000-genomes/vcf/ALL.chrY.phase1_samtools_si.20101123.snps.low_coverage.genotypes.vcf | num=1 type=Float |
num=1 type=Integer | gs://genomics-public-data/1000-genomes/vcf/ALL.chrY.phase1_samtools_si.20101123.snps.low_coverage.genotypes.vcf |
Inferred Headers
ID | Category | Proposed Resolution |
---|---|---|
FT | FORMAT | num=1 type=String |
No Malformed Records Found.