Variation Services
- API version: 2.0.0
- Build date: 2019-04-25T10:32:24.325-07:00[America/Los_Angeles]
Services for variation data processing
NOTE: This service is still in beta testing mode. Please limit your request rate to 1 request/second. dbSNP provides bulk download in VCF and JSON on the FTP site for users with a large number of RefSNPs (>100K) to process.
This repo was automatically generated by the Swagger Codegen using the following command
swagger-codegen generate -i https://api.ncbi.nlm.nih.gov/variation/v0/var_service.yaml
--api-package org.pharmgkb.io.ncbi.api
--model-package org.pharmgkb.io.ncbi.model
--artifact-id ncbi-var-services
--group-id org.pharmgkb
-l java
-o ncbi-var-services
Changes after auto-generation:
- compile target was set to Java 1.8
- removed gradle config for android compile target
Building the API client library requires:
- Java 1.7+
- Maven/Gradle
To install the API client library to your local Maven repository, simply execute:
mvn clean install
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn clean deploy
Refer to the OSSRH Guide for more information.
Add this dependency to your project's POM:
<dependency>
<groupId>org.pharmgkb</groupId>
<artifactId>ncbi-var-services</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
Add this dependency to your project's build file:
compile "org.pharmgkb:ncbi-var-services:1.0.0"
At first generate the JAR by executing:
mvn clean package
Then manually install the following JARs:
target/ncbi-var-services-1.0.0.jar
target/lib/*.jar
Please follow the installation instruction and execute the following Java code:
import org.pharmgkb.io.ncbi.*;
import org.pharmgkb.io.ncbi.auth.*;
import org.pharmgkb.io.ncbi.model.*;
import org.pharmgkb.io.ncbi.api.FrequencyNotYetAvailableComingSoonApi;
import java.io.File;
import java.util.*;
public class FrequencyNotYetAvailableComingSoonApiExample {
public static void main(String[] args) {
FrequencyNotYetAvailableComingSoonApi apiInstance = new FrequencyNotYetAvailableComingSoonApi();
String seqId = "seqId_example"; // String | Sequence id in 'accession.version' format
Integer position = 56; // Integer | Zero-based SPDI-like start position. The number of nucleotides to advance from the position before the first nucleotides before starting the interval.
Integer length = 56; // Integer | SPDI-like length of interval in units of nucleotides
try {
Object result = apiInstance.frequencyByInterval(seqId, position, length);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FrequencyNotYetAvailableComingSoonApi#frequencyByInterval");
e.printStackTrace();
}
}
}
import org.pharmgkb.io.ncbi.*;
import org.pharmgkb.io.ncbi.auth.*;
import org.pharmgkb.io.ncbi.model.*;
import org.pharmgkb.io.ncbi.api.FrequencyNotYetAvailableComingSoonApi;
import java.io.File;
import java.util.*;
public class FrequencyNotYetAvailableComingSoonApiExample {
public static void main(String[] args) {
FrequencyNotYetAvailableComingSoonApi apiInstance = new FrequencyNotYetAvailableComingSoonApi();
try {
Map result = apiInstance.frequencyMetadata();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FrequencyNotYetAvailableComingSoonApi#frequencyMetadata");
e.printStackTrace();
}
}
}
All URIs are relative to https://api.ncbi.nlm.nih.gov/variation/v0
Class | Method | HTTP request | Description |
---|---|---|---|
FrequencyNotYetAvailableComingSoonApi | frequencyByInterval | GET /interval/{seq_id}:{position}:{length}/overlapping_frequency_records | Retrieve frequencies for variants overlapping a position range |
FrequencyNotYetAvailableComingSoonApi | frequencyMetadata | GET /metadata/frequency | Retrieve frequency metadata |
HgvsApi | hgvsBatchContextualsPost | POST /hgvs/batch/contextuals | Retrieve contextual alleles for each input |
HgvsApi | hgvsHgvsContextualsGet | GET /hgvs/{hgvs}/contextuals | Retrieve the contextual alleles equivalent to the HGVS notation input |
RefSnpApi | betaRefsnpRsidGet | GET /beta/refsnp/{rsid} | Lookup RefSNP object by RSID |
SpdiApi | spdiSpdiAllEquivalentContextualGet | GET /spdi/{spdi}/all_equivalent_contextual | Retrieve equivalent contextual allele on all aligned sequences |
SpdiApi | spdiSpdiCanonicalRepresentativeGet | GET /spdi/{spdi}/canonical_representative | Retrieve canonical allele representative |
SpdiApi | spdiSpdiContextualGet | GET /spdi/{spdi}/contextual | Retrieve contextual allele in SPDI syntax for provided allele |
SpdiApi | spdiSpdiHgvsGet | GET /spdi/{spdi}/hgvs | Retrieve HGVS notation for contextual allele in SPDI Syntax |
SpdiApi | spdiSpdiRsidsGet | GET /spdi/{spdi}/rsids | Lookup the RSIDs (if any) associated with the input allele |
SpdiApi | spdiSpdiVcfFieldsGet | GET /spdi/{spdi}/vcf_fields | Retrieve fields suitable for representing the input allele in VCF |
VcfApi | vcfChromPosRefAltsContextualsGet | GET /vcf/{chrom}/{pos}/{ref}/{alts}/contextuals | Retrieve contextual alleles for the reference allele and each alternate allele |
VcfApi | vcfFileSetRsidsPost | POST /vcf/file/set_rsids | For provided VCF data, add RSIDs in the ID field |
- Allele
- AlleleAnnotationList
- AssemblyAnnotForAllele
- ClinvarData
- CodonAlignedTranscriptChange
- Dbsnp1MergeEvent
- DetailedError
- Error
- ErrorError
- ExternalRef
- Frameshift
- FrequencyData
- GeneAnnotForAllele
- Hgvs
- HgvsBatch
- HgvsBatchItem
- HgvsBatchSuccess
- HgvsSuccess
- LostObsMovement
- MergedSnapshotData
- NosnpposSnapshotData
- PlacementAnnot
- PlacementAnnotatedAllele
- PlacementWithAllele
- PresentObsMovement
- PreviousRelease
- PrimarySnapshotData
- ProteinAnnotForAllele
- ProteinVariant
- RefsnpSnapshot
- RefsnpSnapshotSuccess
- RnaAnnotForAllele
- Rsids
- RsidsSuccess
- SeqIdTraitByAssembly
- SoTerm
- Spdi
- SpdiSuccess
- Spdis
- SpdisSuccess
- Support
- SupportId
- UnsupportedSnapshotData
- VcfFields
- VcfFieldsSuccess
- Warnings
- WithdrawnSnapshotData
All endpoints do not require authorization. Authentication schemes defined for the API:
It's recommended to create an instance of ApiClient
per thread in a multithreaded environment to avoid any potential issues.