## ----libraryLoad, warning=FALSE------------------------------------------
suppressMessages(library(ENCODExplorer))

## ----query_results, collapse=TRUE----------------------------------------
query_results <- queryEncode(assay = "RNA-seq", organism = "Homo sapiens",
                       biosample = "MCF-7", file_format = "fastq", fixed = TRUE)

## ----query_results_2, collapse=TRUE--------------------------------------
query_results <- queryEncode(assay = "rnaseq", organism = "Homo sapiens",
                       biosample = "MCF-7", file_format = "fastq", fixed = TRUE)

## ----query_results_3, collapse=TRUE--------------------------------------
query_results <- queryEncode(assay = "rnaseq", organism = "Homo sapiens",
                       biosample = "MCF-7", file_format = "fastq",
                       fixed = FALSE)

## ----files, collapse=TRUE------------------------------------------------
related_files <- resolveEncodeAccession(accession = 'ENCSR918FQM')
related_files$files

## ----search_results, collapse=TRUE---------------------------------------
search_results <- searchEncode(searchTerm = "a549 chip-seq homo sapiens",
                         limit = "all")

## ----query_results_4, collapse=TRUE--------------------------------------
query_results <- queryEncode(assay = "switchgear", target ="elavl1", fixed = FALSE)

## ----search_results_2, collapse=TRUE-------------------------------------
search_results <- searchEncode(searchTerm = "switchgear elavl1", limit = "all")

## ----query_results_5, collapse=TRUE, eval=TRUE---------------------------
query_results <- queryEncode(assay = "switchgear", target ="elavl1",
                       file_format = "bed" , fixed = FALSE)
downloadEncode(resultSet = query_results, resultOrigin = "queryEncode")

## ----collapse=TRUE, eval=TRUE--------------------------------------------
downloadEncode(resultSet = search_results, resultOrigin = "searchEncode", format = "bed")

## ----search_results_3, collapse=TRUE-------------------------------------
search_results <- searchEncode(searchTerm = "switchgear elavl1", limit = "all")

## ----conert_results_1, collapse=TRUE-------------------------------------
convert_results <- searchToquery(searchResults = search_results)

