read_assignments: Read Assignments Files

Description Usage Arguments Details Value Validation Examples

View source: R/read_assignments.R

Description

An 'assignments' file ...

Usage

1

Arguments

file

Pathname to a ‘*_assignments.txt(.gz)’ file.

columns

(optional) Name of columns to be read.

...

Additional arguments passed to readr::read_tsv().

Details

The description here are adopted from GSE84920_README.txt. It is sparse on what 'assignments' files are, but it says: "TXT [ed. we think they meant ASSIGNMENTS] files represent the barcode associations for each sequenced read where two barcodes were identifiable. The format is READNAME\tLEFT_INNER_BARCODE\tRIGHT_INNER_BARCODE\tOUTER_BARCODE, where LEFT_INNER_BARCODE and RIGHT_INNER_BARCODE should match for valid reads. We include all reads here, but note that for all analyses presented in the associated paper, all reads where these barcodes do not match were discarded."

Value

A data.frame with four columns:

readname

...

left_inner_barcode

...

right_inner_barcode

...

outer_barcode

...

Validation

The read_assignments() function does some basic validation on the values read.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
path <- system.file("extdata", package = "GSE84920.parser")
file <- file.path(path, "GSM2254215_ML1.rows=1-1000_assignments.txt.gz")
data <- read_assignments(file)
print(data)
# # A tibble: 1,000 x 4
#    readname                   left_inner_barcode right_inner_barc… outer_barcode
#    <chr>                      <chr>              <chr>             <chr>        
#  1 D00584:136:HMTLJBCXX:1:11… CTCTCACG           CTCTCACG          TCAGATGC     
#  2 D00584:136:HMTLJBCXX:1:11… GCACCATG           GCACCATG          GTGTAGCA     
#  3 D00584:136:HMTLJBCXX:1:11… AGGTGCGA           AGGTGCGA          GTATCTAT     
#  4 D00584:136:HMTLJBCXX:1:11… GCCTTAGG           GCCTTAGG          CAGCATAT     
#  5 D00584:136:HMTLJBCXX:1:11… CACCTGTG           CACCTGTG          TACTAAGC     
#  6 D00584:136:HMTLJBCXX:1:11… CCGCTACG           CCGCTACG          CAGCATAT     
#  7 D00584:136:HMTLJBCXX:1:11… GCCTCGAA           GCCTCGAA          GTATCTAT     
#  8 D00584:136:HMTLJBCXX:1:11… CTGGTCAC           CTGGTCAC          TTGACCAT     
#  9 D00584:136:HMTLJBCXX:1:11… CTGCGTAG           CTGCGTAG          TATCTTGT     
# 10 D00584:136:HMTLJBCXX:1:11… CACGACCT           CACGACCT          GATGATCC     
# # … with 990 more rows

HenrikBengtsson/ramani documentation built on March 27, 2021, 11:47 p.m.