find_url_ebi: Locates and check if fastq files exists in ebi

View source: R/SRA_helper.R

find_url_ebiR Documentation

Locates and check if fastq files exists in ebi

Description

Look for files in ebi file servers, Paired end and single end fastq files.
Fastq ftp url: ftp://ftp.sra.ebi.ac.uk/vol1/fastq
SRA ftp url: ftp://ftp.sra.ebi.ac.uk/vol1/srr
Fastq ASCP url: era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq
SRA ASCP url: era-fasp@fasp.sra.ebi.ac.uk:vol1/srr

Usage

find_url_ebi(
  SRR,
  stop.on.error = FALSE,
  study = NULL,
  ebi_file_format = c("fastq_ftp", "sra_ftp")[1],
  convert_to_ascp = FALSE
)

Arguments

SRR

character, SRR, ERR or DRR numbers.

stop.on.error

logical FALSE, if TRUE will stop if all files are not found. If FALSE returns empty character vector if error is catched.

study

default NULL, optional PRJ (study id) to speed up search for URLs.

ebi_file_format

character, format of run download, default is fastq (ftp): c("fastq_ftp", "sra_ftp")[1]

convert_to_ascp

logical, default FALSE. If TRUE use server: era-fasp@fasp.sra.ebi.ac.uk:

Value

full url to fastq files, same length as input (2 urls for paired end data). Returns empty character() if all files not found.

Examples

# Test the 3 ways to get fastq files from EBI
# Both single end and paired end data

# Most common: SRR(3 first)/0(2 last)/whole
# Single
ORFik:::find_url_ebi("SRR10503056")
# Paired
ORFik:::find_url_ebi("SRR10500056")

# less common: SRR(3 first)/00(1 last)/whole
# Single
#ORFik:::find_url_ebi("SRR1562873")
# Paired
#ORFik:::find_url_ebi("SRR1560083")
# least common SRR(3 first)/whole
# Single
#ORFik:::find_url_ebi("SRR105687")
# Paired
#ORFik:::find_url_ebi("SRR105788")

Roleren/ORFik documentation built on April 12, 2025, 5:31 a.m.