UnzipAndMerge {esATAC} | R Documentation

## Unzip and merge fastq files

### Description

Unzip and merge fastq files that are in format of bzip, gzip or fastq

### Usage

    atacUnzipAndMerge(
      fastqInput1,
      fastqInput2 = NULL,
      fastqOutput1 = NULL,
      fastqOutput2 = NULL,
      interleave = FALSE,
      ...
    )

    unzipAndMerge(
      fastqInput1,
      fastqInput2 = NULL,
      fastqOutput1 = NULL,
      fastqOutput2 = NULL,
      interleave = FALSE,
      ...
    )

### Arguments

`fastqInput1` | `Character` vector. For single-end sequencing, it contains sequence file paths. For paired-end sequencing, it can be file paths with #1 mates paired with file paths in fastqInput2 And it can also be interleaved file paths when argument interleaved=`TRUE`
`fastqInput2` | `Character` vector. It contains file paths with #2 mates paired with file paths in fastqInput1 For single-end sequencing files and interleaved paired-end sequencing files(argument interleaved=`TRUE`), it must be `NULL`.
`fastqOutput1` | `Character`. The trimmed mate1 reads output file path for fastqInput2.
`fastqOutput2` | `Character`. The trimmed mate2 reads output file path for fastqInput2.
`interleave` | `Logical`. Set `TRUE` when files are interleaved paired-end sequencing data.
`...` | Additional arguments, currently unused.

### Value

An invisible `ATACProc-class` object scalar for downstream analysis.

### Author(s)

Zheng Wei

### See Also

`atacRenamer` `atacQCReport`

### Examples

    ignoreCheck() # warnning: run this for fast test only

    td<-tempdir()
    setTmpDir(td)

    # Identify adapters
    prefix<-system.file(package="esATAC", "extdata", "uzmg")
    (reads_1 <-file.path(prefix,"m1",dir(file.path(prefix,"m1"))))
    (reads_2 <-file.path(prefix,"m2",dir(file.path(prefix,"m2"))))

    reads_merged_1 <- file.path(td,"reads_1.fq")
    reads_merged_2 <- file.path(td,"reads_2.fq")
    atacproc <- atacUnzipAndMerge(fastqInput1 = reads_1,fastqInput2 = reads_2)
    dir(td)

[Package esATAC version 1.12.0 Index]