How to load DatabaseVariantAnnotation information ? #1049

Closed
xubo245 opened this Issue Jun 8, 2016 · 2 comments

Comments

Projects
3 participants
@xubo245

xubo245 commented Jun 8, 2016

I have tried :
data: small.vcf in adam-core test resources
methods:

  1. val rdd = sc.loadVcfAnnotations(path)

  2. val rdd = sc.loadVariantAnnotations(path)

  3. val rdd = sc.loadVcf(path, sd)
    val rddDatabase = rdd.flatMap(_.databases)
    4.loadParquetVariantAnnotations

    val path = "xubo/callVariant/vcf/small.vcf" or adam format

these methods can not get dbSnpid

Is data error? or my used metheds error ? or now adam do not support ?

@heuermh heuermh modified the milestone: 0.20.0 Sep 8, 2016

@heuermh heuermh modified the milestones: 0.20.0, 0.22.0, 0.21.0 Oct 13, 2016

@fnothaft

This comment has been minimized.

Show comment
Hide comment
@fnothaft

fnothaft Nov 8, 2016

Member

Should be resolved by #1250.

Member

fnothaft commented Nov 8, 2016

Should be resolved by #1250.

@heuermh

This comment has been minimized.

Show comment
Hide comment
@heuermh

heuermh Jan 5, 2017

Member

Fixed by #1288.

Annotations are now provided for Variants by default (unless projected away). The VCF ID column maps to the Variant.names field and the DB VCF INFO flag maps to the VariantAnnotation.dbSnp field.

In adam-shell

scala> import org.bdgenomics.adam.rdd.ADAMContext._
import org.bdgenomics.adam.rdd.ADAMContext._

scala> val variants = sc.loadVariants("foo.vcf")
variants: org.bdgenomics.adam.rdd.variant.VariantRDD = ...

scala> val head = variants.rdd.collect.head
head: org.bdgenomics.formats.avro.Variant = {"contigName": "1", "start": 14396, "end": ...

scala> head.names
res0: java.util.List[String] = ["rs12076"]

scala> head.getAnnotation.dbSnp
res1: Boolean = true
Member

heuermh commented Jan 5, 2017

Fixed by #1288.

Annotations are now provided for Variants by default (unless projected away). The VCF ID column maps to the Variant.names field and the DB VCF INFO flag maps to the VariantAnnotation.dbSnp field.

In adam-shell

scala> import org.bdgenomics.adam.rdd.ADAMContext._
import org.bdgenomics.adam.rdd.ADAMContext._

scala> val variants = sc.loadVariants("foo.vcf")
variants: org.bdgenomics.adam.rdd.variant.VariantRDD = ...

scala> val head = variants.rdd.collect.head
head: org.bdgenomics.formats.avro.Variant = {"contigName": "1", "start": 14396, "end": ...

scala> head.names
res0: java.util.List[String] = ["rs12076"]

scala> head.getAnnotation.dbSnp
res1: Boolean = true

@heuermh heuermh closed this Jan 5, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment