vcf postion extract
1
0
Entering edit mode
1000G_Q • 0
@1000g_q-9585
Last seen 8.8 years ago

Am trying to read in a vcf file to R. The vcf is from the 1000 G project here -

ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/release/20130502/supporting/functional_annotation/filtered/

so the code

library(VariantAnnotation)
ScanVcfParam(info=c("EAS_AF","EUR_AF","AFR_AF","AMR_AF","SAS_AF","CSQ"))->param
readVcf("ALL.chr2.phase3_shapeit2_mvncall_integrated_v5.20130502.sites.annotation.vcf.gz","hg19",param=param)->cff
length((info(cff)[["CSQ"]]))

The original vcf file has a column with the position (POS) col 2 - however, that is not accessible in the file afterwards.

Also

info(header(cff)):

               Number Type    Description                                  
   CIEND           2      Integer Confidence interval around END for impreci...
   CIPOS           2      Integer Confidence interval around POS for impreci...
   CS              1      String  Source call set.                             
   END             1      Integer End coordinate of this variant               
   IMPRECISE       0      Flag    Imprecise structural variation               
   MC              .      String  Merged calls.                                
   MEINFO          4      String  Mobile element info of the form NAME,START...
   MEND            1      Integer Mitochondrial end coordinate of inserted s...
   MLEN            1      Integer Estimated length of mitochondrial insert     
   MSTART          1      Integer Mitochondrial start coordinate of inserted...
   SVLEN           .      Integer Difference in length between REF and ALT a...
   SVTYPE          1      String  Type of structural variant                   
   TSD             1      String  Precise Target Site Duplication for bases,...
   AC              A      Integer Total number of alternate alleles in calle...
   AF              A      Float   Estimated allele frequency in the range (0,1)
   NS              1      Integer Number of samples with data                  
   AN              1      Integer Total number of alleles in called genotypes  
   EAS_AF          A      Float   Allele frequency in the EAS populations ca...#
   EUR_AF          A      Float   Allele frequency in the EUR populations ca...#
   AFR_AF          A      Float   Allele frequency in the AFR populations ca...#
   AMR_AF          A      Float   Allele frequency in the AMR populations ca...#
   SAS_AF          A      Float   Allele frequency in the SAS populations ca...#
   DP              1      Integer Total read depth                             
   AA              1      String  Ancestral Allele. Format: AA|REF|ALT|Indel...
   CSQ             .      String  Consequence type as predicted by VEP WITH ...#
   GENCODE         .      String  The annotation of coding variants and spli...#
   ALOFT           A      String  The Annotation Of Loss-of-Function Transcr...#
   PHOSPHORYLATION A      String  Predicted as phosphorylation sites by Phos...
   ERB             .      String  Ensembl Regulatory Build. Format: Allele|G...
   HighD           .      String  The Super population with the higher deriv...#
   FUNSEQ          A      Float   FunSeq score for noncoding SNV             

prints a list of parameters to do a selection on. However, the POS column is not among them. How can I get the positions of all the variants in the vcf?

 

 

vcf variantannotation position • 2.4k views
ADD COMMENT
0
Entering edit mode
@michael-lawrence-3846
Last seen 3.0 years ago
United States

The VCF object is a "RangedSummarizedExperiment", so it implements range accessors for getting position information. The start() accessor should give you the position. Also, the underlying GRanges is accessible with rowRanges().

ADD COMMENT
0
Entering edit mode

might you be able to provide some lines to demonstrate? I  dont really get it. If i just type start() I dont get anything..so in whcih wya are the postions accessible?

 

Thanks!!!!

ADD REPLY
0
Entering edit mode

start(cff).

ADD REPLY

Login before adding your answer.

Traffic: 619 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