fetchReadsFromFastq {chimeraviz} | R Documentation

## Fetch reads from fastq files

### Description

This function will fetch read sequences from fastq files and put them into new fastq files.

### Usage

    fetchReadsFromFastq(reads, fastqFileIn1, fastqFileIn2, fastqFileOut1,
      fastqFileOut2)

### Arguments

`reads` | List of read IDs that is to be fetched.
`fastqFileIn1` | First fastq file to search in.
`fastqFileIn2` | Second fastq file to seach in.
`fastqFileOut1` | First fastq file with results.
`fastqFileOut2` | Second fastq file with results.

### Details

Note: This function runs (read only) bash commands on your system. Therefore the function will only work on a unix system.

### Value

The files fastqFileOut1 and fastqFileOut2 populated with the specified reads.

### Examples

    ## Not run:
    # fastq files that has the supporting reads
    fastq1 <- system.file("extdata", "reads.1.fq", package="chimeraviz")
    fastq2 <- system.file("extdata", "reads.2.fq", package="chimeraviz")
    # Which read ids to extract
    reads <- c(
      "13422259", "19375605", "29755061",
      "31632876", "32141428", "33857245")
    # Extract the actual reads and put them in the tmp files "fastqFileOut1" and
    # "fastqFileOut2"
    fastqFileOut1 <- tempfile(pattern = "fq1", tmpdir = tempdir())
    fastqFileOut2 <- tempfile(pattern = "fq2", tmpdir = tempdir())
    fetchReadsFromFastq(reads, fastq1, fastq2,
        fastqFileOut1, fastqFileOut2)
    # We now have the reads supporting fusion 5267 in the two files.

    ## End(Not run)

[Package chimeraviz version 1.4.3 Index]