Question: vcf postion extract
gravatar for 1000G_Q
2.1 years ago by
1000G_Q0 wrote:

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

so the code


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



               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 2.1 years ago by Martin Morgan ♦♦ 21k • written 2.1 years ago by 1000G_Q0
gravatar for Michael Lawrence
2.1 years ago by
United States
Michael Lawrence9.9k 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 2.1 years ago by Michael Lawrence9.9k

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



ADD REPLYlink written 2.1 years ago by 1000G_Q0


ADD REPLYlink written 2.1 years ago by Martin Morgan ♦♦ 21k
Please log in to add an answer.


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