VCF file
0
0
Entering edit mode
2.6 years ago
Nai ▴ 50

Removal Sample

###junk removal

vcftools --gzvcf cohorts_combined_filtered_calls_annotated.vcf --maf 0.05 --max-missing 0.8 --min-meanDP 10 --recode --out SNP-co.vcf


####Sample removal

bcftools view --samples-file ^ /media/bioinformatician/My\ Passport/sample_id_no-RNASEq.txt SNP-co.vcf.



###chromosome extraction

vcftools --gzvcf SNP_co.vcf.gz --chr 2 --from-bp 47843908 --to-bp 47877312 --recode --out snps_filt_chr2

##conversion vcf to plink
./plink --vcf /media/bioinformatician/My\ Passport/annotated/tabix/snps_filt_chr2.vcf.gz.recode.vcf --recode HV --out /media/bioinformatician/My\ Passport/annotated/tabix/chr2
PLINK v1.90p 64-bit (6 Jun 2021)             
Logging to /media/bioinformatician/My Passport/annotated/tabix/chr2.log.
Options in effect:
  --out /media/bioinformatician/My Passport/annotated/tabix/chr2
  --recode HV
  --vcf /media/bioinformatician/My Passport/annotated/tabix/snps_filt_chr2.vcf.gz.recode.vcf

31909 MB RAM detected; reserving 15954 MB for main workspace.
Error: No variants in VCF file.
and VCF haploview • 1.4k views
ADD COMMENT
0
Entering edit mode

Please take some time to formulate a question to go with this section of code.

ADD REPLY
0
Entering edit mode

Ohh Sorry. The query was deleted out of that. I have vcf file, I want to remove some samples, filter junk and extract chr2 with specific position as vcf file to visualize in haploview. I executed above commands. I am getting error. Please help me.

ADD REPLY
0
Entering edit mode

IMO it seems your VCF files does not contain any variants at Chr2 47843908 - 47877312. Maybe try to use grep/awk to check manually if there is any position in this region showing a variant.

ADD REPLY
0
Entering edit mode

The variant is already known in this region. Previously it was giving an error there is no genotype.

ADD REPLY

Login before adding your answer.

Traffic: 2123 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6