Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to load DatabaseVariantAnnotation information ? #1049

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

How to load DatabaseVariantAnnotation information ? #1049

xubo245 opened this issue Jun 8, 2016 · 2 comments
Milestone

Comments

@xubo245
Copy link

@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
Copy link
Member

@fnothaft fnothaft commented Nov 8, 2016

Should be resolved by #1250.

@heuermh
Copy link
Member

@heuermh 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
Projects
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.