check_md5: Check file integrity with md5sum

View source: R/01_download_data.R

check_md5R Documentation

Check file integrity with md5sum

Description

Check file integrity with md5sum

Usage

check_md5(run_accessions = NULL, fastqdir = "results/01_FASTQ_files")

Arguments

run_accessions

Character vector of run accessions.

fastqdir

Path to the directory where .fastq files will be stored. Default: results/01_FASTQ_files.

Value

A data frame with variables Run and Status with run accession and integrity status, respectively.

Examples

urls <- c(
    "ftp.sra.ebi.ac.uk/vol1/fastq/SRR926/SRR926397/SRR926397_1.fastq.gz",
    "ftp.sra.ebi.ac.uk/vol1/fastq/SRR926/SRR926397/SRR926397_2.fastq.gz"
)
sample_info <- data.frame(
    BioSample = "SAMN01924555",
    Experiment = "SRX245306",
    Run = "SRR926397",
    BioProject = "PRJNA190191", Instrument = "Illumina HiSeq 2000", 
    Layout = "PAIRED"
)
fastqdir <- tempdir()
d <- download_from_ena(
    sample_info, urls = urls, fastqdir = fastqdir, method = "libcurl"
)

# Check MD5
run_accessions <- sample_info$Run
check_md5(run_accessions, fastqdir)

almeidasilvaf/bears documentation built on April 14, 2023, 7:06 p.m.