# Define arguments
file1 <- system.file("extdata/small_R1.fq", package = "Rsearch")
file2 <- system.file("extdata/small_R1.fq", package = "Rsearch")
file_format <- "fastq"
file1_out <- NULL
file2_out <- NULL
# Synchronize files and return as a tibble
sync_seqs <- fastx_synchronize(file1 = file1,
file2 = file2,
file_format = file_format,
file1_out = file1_out,
file2_out = file2_out)
# Extract tibbles with synchronized sequences
R1_sync <- sync_seqs
R2_sync <- attr(sync_seqs, "reverse")
# Synchronize files and write to output files
# Define output file names
out1 <- tempfile(fileext = ".fastq")
out2 <- tempfile(fileext = ".fastq")
fastx_synchronize(file1 = file1,
file2 = file2,
file_format = file_format,
file1_out = out1,
file2_out = out2)
unlink(c(out1, out2))
Run the code above in your browser using DataLab