This vignette demonstrates the processing of raw reads from NGS to generate the flycode to nanobody linkage used in the proteomics data analysis. The workflow includes several filtering steps to extract high quality nanobody and flycode amino acid sequences.
NestLink 1.21.0
The following content is described in more detail in Egloff et al. (2018), (under review NMETH-A35040).
library(NestLink)
library(ExperimentHub)
eh <- ExperimentHub()
query(eh, "NestLink")
## ExperimentHub with 8 records
## # snapshotDate(): 2024-10-24
## # $dataprovider: Functional Genomics Center Zurich (FGCZ)
## # $species: NA
## # $rdataclass: data.frame, DNAStringSet
## # additional mcols(): taxonomyid, genome, description,
## # coordinate_1_based, maintainer, rdatadateadded, preparerclass, tags,
## # rdatapath, sourceurl, sourcetype
## # retrieve records with, e.g., 'object[["EH2063"]]'
##
## title
## EH2063 | Sample NGS NB FC linkage data
## EH2064 | Flycodes tryptic digested
## EH2065 | Nanobodies tryptic digested
## EH2066 | FASTA as ground-truth for unit testing
## EH2067 | Known nanobodies
## EH2068 | Quantitaive results for SMEG and COLI
## EH2069 | F255744 Mascot Search result
## EH2070 | WU160118 Mascot Search results
# dataFolder <- file.path(path.package(package = 'NestLink'), 'extdata')
# expFile <- list.files(dataFolder, pattern='*.fastq.gz', full.names = TRUE)
expFile <- query(eh, c("NestLink", "NL42_100K.fastq.gz"))[[1]]
## see ?NestLink and browseVignettes('NestLink') for documentation
## loading from cache
scratchFolder <- tempdir()
setwd(scratchFolder)
For data QC some known NB were spiked in. Here, we load the NB DNA sequences and translate them to the corresponding AA sequences.
# knownNB_File <- list.files(dataFolder,
# pattern='knownNB.txt', full.names = TRUE)
knownNB_File <- query(eh, c("NestLink", "knownNB.txt"))[[1]]
## see ?NestLink and browseVignettes('NestLink') for documentation
## loading from cache
knownNB_data <- read.table(knownNB_File, sep='\t',
header = TRUE, row.names = 1, stringsAsFactors = FALSE)
knownNB <- Biostrings::translate(DNAStringSet(knownNB_data$Sequence))
names(knownNB) <- rownames(knownNB_data)
knownNB <- sapply(knownNB, toString)
The workflow uses the first 100 reads only for a rapid processing time.
param <- list()
param[['nReads']] <- 100 #Number of Reads from the start of fastq file to process
param[['maxMismatch']] <- 1 #Number of accepted mismatches for all pattern search steps
param[['NB_Linker1']] <- "GGCCggcggGGCC" #Linker Sequence left to nanobody
param[['NB_Linker2']] <- "GCAGGAGGA" #Linker Sequence right to nanobody
param[['ProteaseSite']] <- "TTAGTCCCAAGA" #Sequence next to flycode
param[['FC_Linker']] <- "GGCCaaggaggcCGG" #Linker Sequence next to flycode
param[['knownNB']] <- knownNB
param[['minRelBestHitFreq']] <- 0.8 #minimal fraction of the dominant nanobody for a specific flycode
param[['minConsensusScore']] <- 0.9 #minimal fraction per sequence position in nanabody consensus sequence calculation
param[['minNanobodyLength']] <- 348 #minimal nanobody length in [nt]
param[['minFlycodeLength']] <- 33 #minimal flycode length in [nt]
param[['FCminFreq']] <- 1 #minimal number of subreads for a specific flycode to keep it in the analysis
The following steps are included:
system.time(NB2FC <- runNGSAnalysis(file = expFile[1], param))
## user system elapsed
## 2.135 0.171 2.303
head(NB2FC, 2)
## NB
## 1 SQVQLVESGGGLVQAGGSLRLSCAASGFPVEAHRMYWYRQAPGKEREWVAAISSKGQQTWYADSVKGRFTISRDNAKNTVYLQMNSLKPEDTAVYYCNVKDYGWYYGDYDYWGQGTQVTVS
## 2 SQVQLVESGGGLVQAGGSLRLSCAASGFPVSWTKMYWYRQAPGKEREWVAAIWSTGSWTKYADSVKGRFTISRDNAKNTVYLQMNSLKPEDTAVYYCNVKDKGHQHAHYDYWGQGTQVTVS
## FlycodeCount
## 1 29
## 2 3
## AssociatedFlycodes
## 1 GSAAATAVTWR,GSADGQETDWR,GSADVPEAVWLTVR,GSAPTAPVSWQEGGR,GSAVDPVTVWLTVR,GSDAEGVAAWQSR,GSDAEYTTAWR,GSDDTDETDWR,GSDEAEEEGWQEGGR,GSDPGTDDEWQSR,GSDTEDWEEWQSR,GSDVWDTAVWLTVR,GSEGTDAVGWLTVR,GSEPASEVVWQEGGR,GSEPDVYTAWLTVR,GSEVLDGDEWR,GSFVASF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AIWSEGWWTKYADSVKGRFTISRDNAKNTVYLQMNSLKPEDTAVYYCNVKDYGGENANYDYWGQGTQVTVS\nGSDGTTEDAWQEGGR\n"
## [4] ">NB0004 FC1 SQVQLVESGGGLVQAGGSLRLSCAASGFPVEWSWMYWYRQAPGKEREWVAAIYSQGRGTEYADSVKGRFTISRDNAKNTVYLQMNSLKPEDTAVYYCNVKDYGWWYGDYDYWGQGTQVTVS\nGSEEAADPAWR\n"
## [5] ">NB0005 FC1 SQVQLVESGGGLVQAGGSLRLSCAASGFPVEAHRMYWYRQAPGKEREWVAAISSKGQQTWYADSVKGRFTISRDNAKNTVYLQMNSLEPEDTAVYYCNVKDYGWYYGDYDYWGQGTQVTVS\nGSEEAEATWWR\n"
## [6] ">NB0006 FC2 SQVQLVESGGGLVQAGGSLRLSCAASGFPVEENFMYWYRQAPGKEREWVAAIYSHGYETEYADSVKGRFTISRDNAKNTVYLQMNSLKPEDTAVYYCNVKDQGYWWWEYDYWGQGTQVTVS\nGSGLPATPAWLRGSTDAEEGVWLTVR\n"
To analyze the expressed flycodes mass spectrometry is used.
the FASTA file containing the nanobody - flycode linkage can
be written to a file using functions such as cat
.
The exec directory provides alternative shell scripts using command line GNU tools and AWK.
Here is the output of the sessionInfo()
command.
## R Under development (unstable) (2024-10-21 r87258)
## Platform: x86_64-pc-linux-gnu
## Running under: Ubuntu 24.04.1 LTS
##
## Matrix products: default
## BLAS: /home/biocbuild/bbs-3.21-bioc/R/lib/libRblas.so
## LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.12.0
##
## locale:
## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
## [3] LC_TIME=en_GB LC_COLLATE=C
## [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
## [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
## [9] LC_ADDRESS=C LC_TELEPHONE=C
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
##
## time zone: America/New_York
## tzcode source: system (glibc)
##
## attached base packages:
## [1] stats4 stats graphics grDevices utils datasets methods
## [8] base
##
## other attached packages:
## [1] scales_1.3.0 ggplot2_3.5.1
## [3] NestLink_1.21.0 ShortRead_1.63.2
## [5] GenomicAlignments_1.41.0 SummarizedExperiment_1.35.5
## [7] Biobase_2.65.1 MatrixGenerics_1.17.1
## [9] matrixStats_1.4.1 Rsamtools_2.21.2
## [11] GenomicRanges_1.57.2 BiocParallel_1.39.0
## [13] protViz_0.7.9 gplots_3.2.0
## [15] Biostrings_2.73.2 GenomeInfoDb_1.41.2
## [17] XVector_0.45.0 IRanges_2.39.2
## [19] S4Vectors_0.43.2 ExperimentHub_2.13.1
## [21] AnnotationHub_3.13.3 BiocFileCache_2.13.2
## [23] dbplyr_2.5.0 BiocGenerics_0.51.3
## [25] BiocStyle_2.33.1
##
## loaded via a namespace (and not attached):
## [1] DBI_1.2.3 bitops_1.0-9 deldir_2.0-4
## [4] rlang_1.1.4 magrittr_2.0.3 compiler_4.5.0
## [7] RSQLite_2.3.7 mgcv_1.9-1 png_0.1-8
## [10] vctrs_0.6.5 pwalign_1.1.0 pkgconfig_2.0.3
## [13] crayon_1.5.3 fastmap_1.2.0 magick_2.8.5
## [16] labeling_0.4.3 caTools_1.18.3 utf8_1.2.4
## [19] rmarkdown_2.28 UCSC.utils_1.1.0 tinytex_0.53
## [22] purrr_1.0.2 bit_4.5.0 xfun_0.48
## [25] zlibbioc_1.51.2 cachem_1.1.0 jsonlite_1.8.9
## [28] blob_1.2.4 highr_0.11 DelayedArray_0.31.14
## [31] jpeg_0.1-10 parallel_4.5.0 R6_2.5.1
## [34] bslib_0.8.0 RColorBrewer_1.1-3 jquerylib_0.1.4
## [37] Rcpp_1.0.13 bookdown_0.41 knitr_1.48
## [40] splines_4.5.0 Matrix_1.7-1 tidyselect_1.2.1
## [43] abind_1.4-8 yaml_2.3.10 codetools_0.2-20
## [46] hwriter_1.3.2.1 curl_5.2.3 lattice_0.22-6
## [49] tibble_3.2.1 withr_3.0.1 KEGGREST_1.45.1
## [52] evaluate_1.0.1 pillar_1.9.0 BiocManager_1.30.25
## [55] filelock_1.0.3 KernSmooth_2.23-24 generics_0.1.3
## [58] BiocVersion_3.20.0 munsell_0.5.1 gtools_3.9.5
## [61] glue_1.8.0 tools_4.5.0 interp_1.1-6
## [64] grid_4.5.0 latticeExtra_0.6-30 AnnotationDbi_1.67.0
## [67] colorspace_2.1-1 nlme_3.1-166 GenomeInfoDbData_1.2.13
## [70] cli_3.6.3 rappdirs_0.3.3 fansi_1.0.6
## [73] S4Arrays_1.5.11 dplyr_1.1.4 gtable_0.3.6
## [76] sass_0.4.9 digest_0.6.37 SparseArray_1.5.45
## [79] farver_2.1.2 memoise_2.0.1 htmltools_0.5.8.1
## [82] lifecycle_1.0.4 httr_1.4.7 mime_0.12
## [85] bit64_4.5.2