Search
Question: vcf postion extract
0
gravatar for 1000G_Q
22 months ago by
1000G_Q0
1000G_Q0 wrote:

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?

 

 

ADD COMMENTlink modified 22 months ago by Martin Morgan ♦♦ 20k • written 22 months ago by 1000G_Q0
0
gravatar for Michael Lawrence
22 months ago by
United States
Michael Lawrence9.8k wrote:

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 COMMENTlink written 22 months ago by Michael Lawrence9.8k

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 REPLYlink written 22 months ago by 1000G_Q0

start(cff).

ADD REPLYlink written 22 months ago by Martin Morgan ♦♦ 20k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 328 users visited in the last hour