Linux7 VCF 파일에서 missing allele 분석하는 방법 (bcftools) VCF 파일에서 missing allele 분석하는 방법 이번에는 Bash 스크립트로 VCF 파일에서 missing allele 분석하는 방법을 알아보겠습니다. bcftools 를 활용하면 쉽게 확인 할 수 있습니다. bash 스크립트를 활용해서 각 샘플에서 missing allele (. 또는 ./.)의 비율을 계산합니다.#!/bin/bash# VCF 파일 경로VCF_FILE="path/to/your/file.vcf"# 중간결과값 저장용으로 temp 파일 만들기TEMP_FILE=$(mktemp)# FORMAT 과 sample columns 추출bcftools query -f '[%SAMPLE\t%GT\n]' $VCF_FILE > $TEMP_FILE# missing allele counts and t.. 2024. 7. 14. PhantomJS - Scriptable Headless Browser PhantomJS - Scriptable Headless Browser https://phantomjs.org/ PhantomJS - Scriptable Headless BrowserPhantomJS - Scriptable Headless Browser Important: PhantomJS development is suspended until further notice (more details). PhantomJS is a headless web browser scriptable with JavaScript. It runs on Windows, macOS, Linux, and FreeBSD. Using QtWebKit as thephantomjs.org PhantomJS는 서버 측에서 웹 페이지를 사.. 2024. 7. 12. 특정 라인만 변수 지정해서 스크립트 실행하는 방법 라인 100부터 150까지의 sampleslist.txt만 처리하기 위해 sed를 사용하여 해당 라인들을 추출 for f in $(sed -n '100,150p' sampleslist.txt) ; do python sample_parsing.py "$f" >> sample_result.txt echo "$f"done 2024. 6. 8. 쉘 스크립트 멀티프로세스 parallel run 방법 쉘 스크립트를 멀티프로세스로 병렬 작업하는 방법 1 .sampleslist.txt 파일을 세 개의 작은 파일로 분할 2. 각 분할 파일을 처리할 스크립트 생성 ( process_samples.sh) 3. 각 스크립트를 별도의 터미널에서 nohup을 사용하여 실행 split -l $(( $(wc -l #!/bin/bashif [ $# -eq 0 ]; then echo "No arguments provided" exit 1fisample_file=$1for f in $(cat $sample_file); do python sample_parsing.py $f >> sample_reulst.txt echo "$f"doneecho "Processing complete for $samples.. 2024. 6. 8. 이전 1 2 다음