search_reads: Search for Reads

Description Usage Arguments Examples

Description

Search for Reads

Usage

1
2
search_reads(client, read_group_ids, reference_id = NULL, start = NULL,
  end = NULL, page_size = NULL, page_token = NULL)

Arguments

client

A ga4gh_client object

read_group_ids

A list of Read Group IDs. The Read Groups to search. At least one id must be specified.

reference_id

The reference to query. Leaving blank returns results from all references, including unmapped reads - this could be very large.

start

The start position (0-based) of this query. If a reference is specified, this defaults to 0. Genomic positions are non-negative integers less than reference length. Requests spanning the join of circular genomes are represented as two requests one on each side of the join (position 0).

end

The end position (0-based, exclusive) of this query. If a reference is specified, this defaults to the reference's length.

page_size

Specifies the maximum number of results to return in a single page. If unspecified, the client default will be used.

page_token

The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of nextPageToken from the previous response.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
ref_client <- ga4gh_client("http://1kgenomes.ga4gh.org", api_location = "")

## Not run: 
library(magrittr)
## Find a dataset to search in
datasets <- ref_client %>% search_datasets() %>% content()
d_id <- datasets$datasets[[1]]$id

## Find a read group to search in
read_group_sets <- ref_client %>% search_read_group_sets(d_id) %>% content()
rg_id <- read_group_sets$readGroupSets[[1]]$readGroups[[1]]$id

## Find a reference_id to map reads (unmapped reads not supported yet)
rs_id <- ref_client %>% search_reference_sets %>% content() %>%
 `$`("referenceSets") %>% `[[`(1) %>% `$`("id")
ref_id <- ref_client %>% search_references(rs_id) %>% content() %>%
 `$`("references") %>% `[[`(1) %>% `$`("id")

## Search for reads in the read group set
reads <- ref_client %>% search_reads(rg_id, reference_id = ref_id) %>% content()
reads


## End(Not run)

Rga4gh documentation built on May 1, 2019, 6:35 p.m.