{"id":16731297,"url":"https://github.com/mikelove/bioc-refcard","last_synced_at":"2026-02-08T04:33:29.089Z","repository":{"id":5769297,"uuid":"6982571","full_name":"mikelove/bioc-refcard","owner":"mikelove","description":"Bioconductor cheat sheet","archived":false,"fork":false,"pushed_at":"2024-08-26T13:25:30.000Z","size":385,"stargazers_count":191,"open_issues_count":2,"forks_count":66,"subscribers_count":18,"default_branch":"main","last_synced_at":"2025-07-27T03:53:40.554Z","etag":null,"topics":["bioconductor","bioinformatics","cheatsheet","compbio","guide","howto","microarray","r","rnaseq"],"latest_commit_sha":null,"homepage":"http://mikelove.github.io/bioc-refcard/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mikelove.png","metadata":{"files":{"readme":"README.html","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-12-03T13:21:13.000Z","updated_at":"2025-07-07T21:52:30.000Z","dependencies_parsed_at":"2024-10-25T18:35:10.587Z","dependency_job_id":"68688004-e60f-42cb-9031-a119e1befe2b","html_url":"https://github.com/mikelove/bioc-refcard","commit_stats":{"total_commits":88,"total_committers":4,"mean_commits":22.0,"dds":0.375,"last_synced_commit":"8d464130f82edde81ecaa8af474db81701b872b8"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mikelove/bioc-refcard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikelove%2Fbioc-refcard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikelove%2Fbioc-refcard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikelove%2Fbioc-refcard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikelove%2Fbioc-refcard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikelove","download_url":"https://codeload.github.com/mikelove/bioc-refcard/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikelove%2Fbioc-refcard/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29220508,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T03:18:47.732Z","status":"ssl_error","status_checked_at":"2026-02-08T03:15:31.985Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bioconductor","bioinformatics","cheatsheet","compbio","guide","howto","microarray","r","rnaseq"],"created_at":"2024-10-12T23:36:34.200Z","updated_at":"2026-02-08T04:33:29.073Z","avatar_url":"https://github.com/mikelove.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!DOCTYPE html\u003e\n\u003chtml xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en\" xml:lang=\"en\"\u003e\u003chead\u003e\n\n\u003cmeta charset=\"utf-8\"\u003e\n\u003cmeta name=\"generator\" content=\"quarto-1.3.353\"\u003e\n\n\u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, user-scalable=yes\"\u003e\n\n\u003cmeta name=\"author\" content=\"Michael Love\"\u003e\n\n\u003ctitle\u003eBioconductor cheat sheet\u003c/title\u003e\n\u003cstyle\u003e\ncode{white-space: pre-wrap;}\nspan.smallcaps{font-variant: small-caps;}\ndiv.columns{display: flex; gap: min(4vw, 1.5em);}\ndiv.column{flex: auto; overflow-x: auto;}\ndiv.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}\nul.task-list{list-style: none;}\nul.task-list li input[type=\"checkbox\"] {\n  width: 0.8em;\n  margin: 0 0.8em 0.2em -1em; /* quarto-specific, see https://github.com/quarto-dev/quarto-cli/issues/4556 */ \n  vertical-align: middle;\n}\n\u003c/style\u003e\n\n\n\u003cscript src=\"README_files/libs/clipboard/clipboard.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"README_files/libs/quarto-html/quarto.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"README_files/libs/quarto-html/popper.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"README_files/libs/quarto-html/tippy.umd.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"README_files/libs/quarto-html/anchor.min.js\"\u003e\u003c/script\u003e\n\u003clink href=\"README_files/libs/quarto-html/tippy.css\" rel=\"stylesheet\"\u003e\n\u003clink href=\"README_files/libs/quarto-html/quarto-syntax-highlighting.css\" rel=\"stylesheet\" id=\"quarto-text-highlighting-styles\"\u003e\n\u003cscript src=\"README_files/libs/bootstrap/bootstrap.min.js\"\u003e\u003c/script\u003e\n\u003clink href=\"README_files/libs/bootstrap/bootstrap-icons.css\" rel=\"stylesheet\"\u003e\n\u003clink href=\"README_files/libs/bootstrap/bootstrap.min.css\" rel=\"stylesheet\" id=\"quarto-bootstrap\" data-mode=\"light\"\u003e\n\n\n\u003c/head\u003e\n\n\u003cbody\u003e\n\n\u003cdiv id=\"quarto-content\" class=\"page-columns page-rows-contents page-layout-article\"\u003e\n\u003cdiv id=\"quarto-margin-sidebar\" class=\"sidebar margin-sidebar\"\u003e\n\u003cdiv class=\"quarto-alternate-formats\"\u003e\u003ch2\u003eOther Formats\u003c/h2\u003e\u003cul\u003e\u003cli\u003e\u003ca href=\"README.pdf\"\u003e\u003ci class=\"bi bi-file-pdf\"\u003e\u003c/i\u003ePDF\u003c/a\u003e\u003c/li\u003e\u003c/ul\u003e\u003c/div\u003e\u003c/div\u003e\n\u003cmain class=\"content\" id=\"quarto-document-content\"\u003e\n\n\u003cheader id=\"title-block-header\" class=\"quarto-title-block default\"\u003e\n\u003cdiv class=\"quarto-title\"\u003e\n\u003ch1 class=\"title\"\u003eBioconductor cheat sheet\u003c/h1\u003e\n\u003c/div\u003e\n\n\n\n\u003cdiv class=\"quarto-title-meta\"\u003e\n\n    \u003cdiv\u003e\n    \u003cdiv class=\"quarto-title-meta-heading\"\u003eAuthor\u003c/div\u003e\n    \u003cdiv class=\"quarto-title-meta-contents\"\u003e\n             \u003cp\u003eMichael Love \u003c/p\u003e\n          \u003c/div\u003e\n  \u003c/div\u003e\n    \n  \n    \n  \u003c/div\u003e\n  \n\n\u003c/header\u003e\n\n\u003csection id=\"install\" class=\"level2\"\u003e\n\u003ch2 class=\"anchored\" data-anchor-id=\"install\"\u003eInstall\u003c/h2\u003e\n\u003cp\u003eFor details go to http://bioconductor.org/install/\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003eif (!requireNamespace(\"BiocManager\"))\n    install.packages(\"BiocManager\")\nBiocManager::install()\nBiocManager::install(c(\"package1\",\"package2\")\nBiocManager::valid() # are packages up to date?\n\n# what Bioc version is release right now?\nhttp://bioconductor.org/bioc-version\n# what Bioc versions are release/devel?\nhttp://bioconductor.org/js/versions.js\u003c/code\u003e\u003c/pre\u003e\n\u003c/section\u003e\n\u003csection id=\"help-within-r\" class=\"level2\"\u003e\n\u003ch2 class=\"anchored\" data-anchor-id=\"help-within-r\"\u003ehelp within R\u003c/h2\u003e\n\u003cp\u003eSimple help:\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e?functionName\n?\"eSet-class\" # classes need the '-class' on the end\nhelp(package=\"foo\",help_type=\"html\") # launch web browser help\nvignette(\"topic\")\nbrowseVignettes(package=\"package\") # show vignettes for the package\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eHelp for advanced users:\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003efunctionName # prints source code\ngetMethod(method,\"class\")  # prints source code for method\nselectMethod(method, \"class\") # will climb the inheritance to find method\nshowMethods(classes=\"class\") # show all methods for class\nmethods(class=\"GRanges\") # this will work in R \u0026gt;= 3.2\n?\"functionName,class-method\" # method help for S4 objects, e.g.:\n?\"plotMA,data.frame-method\" # from library(geneplotter)\n?\"method.class\" # method help for S3 objects e.g.:\n?\"plot.lm\"\nsessionInfo() # necessary info for getting help\npackageVersion(\"foo\") # what version of package \u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eBioconductor support website: https://support.bioconductor.org\u003c/p\u003e\n\u003cp\u003eIf you use RStudio, then you already get nicely rendered documentation using \u003ccode\u003e?\u003c/code\u003e or \u003ccode\u003ehelp\u003c/code\u003e. If you are a command line person, then you can use this alias to pop up a help page in your web browser with \u003ccode\u003erhelp functionName packageName\u003c/code\u003e.\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003ealias rhelp=\"Rscript -e 'args \u0026lt;- commandArgs(TRUE); help(args[2], package=args[3], help_type=\\\"html\\\"); Sys.sleep(5)' --args\"\u003c/code\u003e\u003c/pre\u003e\n\u003c/section\u003e\n\u003csection id=\"debugging-r\" class=\"level2\"\u003e\n\u003ch2 class=\"anchored\" data-anchor-id=\"debugging-r\"\u003edebugging R\u003c/h2\u003e\n\u003cpre\u003e\u003ccode\u003etraceback() # what steps lead to an error\n# debug a function\ndebug(myFunction) # step line-by-line through the code in a function\nundebug(myFunction) # stop debugging\ndebugonce(myFunction) # same as above, but doesn't need undebug()\n# also useful if you are writing code is to put\n# the function browser() inside a function at a critical point\n# this plus devtools::load_all() can be useful for programming\n# to jump in function on error:\noptions(error=recover)\n# turn that behavior off:\noptions(error=NULL)\n# debug, e.g. estimateSizeFactors from DESeq2...\n# debugging an S4 method is more difficult; this gives you a peek inside:\ntrace(estimateSizeFactors, browser, exit=browser, signature=\"DESeqDataSet\")\u003c/code\u003e\u003c/pre\u003e\n\u003c/section\u003e\n\u003csection id=\"show-package-specific-methods-for-a-class\" class=\"level2\"\u003e\n\u003ch2 class=\"anchored\" data-anchor-id=\"show-package-specific-methods-for-a-class\"\u003eShow package-specific methods for a class\u003c/h2\u003e\n\u003cp\u003eThese two long strings of R code do approximately the same thing: obtain the methods that operate on an object of a given class, which are defined in a specific package.\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003eintersect(sapply(strsplit(as.character(methods(class=\"DESeqDataSet\")), \",\"), `[`, 1), ls(\"package:DESeq2\"))\nsub(\"Function: (.*) \\\\(package .*\\\\)\",\"\\\\1\",grep(\"Function\",showMethods(classes=\"DESeqDataSet\", where=getNamespace(\"DESeq2\"), printTo=FALSE), value=TRUE))\u003c/code\u003e\u003c/pre\u003e\n\u003c/section\u003e\n\u003csection id=\"annotations\" class=\"level2\"\u003e\n\u003ch2 class=\"anchored\" data-anchor-id=\"annotations\"\u003eAnnotations\u003c/h2\u003e\n\u003cp\u003eFor AnnotationHub examples, see:\u003c/p\u003e\n\u003cp\u003ehttps://www.bioconductor.org/help/workflows/annotation/Annotation_Resources\u003c/p\u003e\n\u003cp\u003eThe following is how to work with the organism database packages, and biomart.\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"http://www.bioconductor.org/packages/release/bioc/html/AnnotationDbi.html\"\u003eAnnotationDbi\u003c/a\u003e\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e# using one of the annotation packges\nlibrary(AnnotationDbi)\nlibrary(org.Hs.eg.db) # or, e.g. Homo.sapiens\ncolumns(org.Hs.eg.db)\nkeytypes(org.Hs.eg.db)\nhead(keys(org.Hs.eg.db, keytype=\"ENTREZID\"))\n# returns a named character vector, see ?mapIds for multiVals options\nres \u0026lt;- mapIds(org.Hs.eg.db, keys=k, column=\"ENSEMBL\", keytype=\"ENTREZID\")\n\n# generates warning for 1:many mappings\nres \u0026lt;- select(org.Hs.eg.db, keys=k,\n  columns=c(\"ENTREZID\",\"ENSEMBL\",\"SYMBOL\"),\n  keytype=\"ENTREZID\")\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003e\u003ca href=\"http://www.bioconductor.org/packages/release/bioc/html/biomaRt.html\"\u003ebiomaRt\u003c/a\u003e\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e# map from one annotation to another using biomart\nlibrary(biomaRt)\nm \u0026lt;- useMart(\"ensembl\", dataset = \"hsapiens_gene_ensembl\")\nmap \u0026lt;- getBM(mart = m,\n  attributes = c(\"ensembl_gene_id\", \"entrezgene\"),\n  filters = \"ensembl_gene_id\", \n  values = some.ensembl.genes)\u003c/code\u003e\u003c/pre\u003e\n\u003c/section\u003e\n\u003csection id=\"genomic-ranges\" class=\"level2\"\u003e\n\u003ch2 class=\"anchored\" data-anchor-id=\"genomic-ranges\"\u003eGenomic ranges\u003c/h2\u003e\n\u003cp\u003e\u003ca href=\"http://bioconductor.org/packages/release/bioc/html/GenomicRanges.html\"\u003eGenomicRanges\u003c/a\u003e\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003elibrary(GenomicRanges)\nz \u0026lt;- GRanges(\"chr1\",IRanges(1000001,1001000),strand=\"+\")\nstart(z)\nend(z)\nwidth(z)\nstrand(z)\nmcols(z) # the 'metadata columns', any information stored alongside each range\nranges(z) # gives the IRanges\nseqnames(z) # the chromosomes for each ranges\nseqlevels(z) # the possible chromosomes\nseqlengths(z) # the lengths for each chromosome\u003c/code\u003e\u003c/pre\u003e\n\u003csection id=\"intra-range-methods\" class=\"level3\"\u003e\n\u003ch3 class=\"anchored\" data-anchor-id=\"intra-range-methods\"\u003eIntra-range methods\u003c/h3\u003e\n\u003cp\u003eAffects ranges independently\u003c/p\u003e\n\u003ctable class=\"table\"\u003e\n\u003cthead\u003e\n\u003ctr class=\"header\"\u003e\n\u003cth\u003efunction\u003c/th\u003e\n\u003cth\u003edescription\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr class=\"odd\"\u003e\n\u003ctd\u003eshift\u003c/td\u003e\n\u003ctd\u003emoves left/right\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr class=\"even\"\u003e\n\u003ctd\u003enarrow\u003c/td\u003e\n\u003ctd\u003enarrows by relative position within range\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr class=\"odd\"\u003e\n\u003ctd\u003eresize\u003c/td\u003e\n\u003ctd\u003eresizes to width, fixing start for +, end for -\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr class=\"even\"\u003e\n\u003ctd\u003eflank\u003c/td\u003e\n\u003ctd\u003ereturns flanking ranges to the left +, or right -\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr class=\"odd\"\u003e\n\u003ctd\u003epromoters\u003c/td\u003e\n\u003ctd\u003esimilar to flank\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr class=\"even\"\u003e\n\u003ctd\u003erestrict\u003c/td\u003e\n\u003ctd\u003erestricts ranges to a start and end position\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr class=\"odd\"\u003e\n\u003ctd\u003etrim\u003c/td\u003e\n\u003ctd\u003etrims out of bound ranges\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr class=\"even\"\u003e\n\u003ctd\u003e+/-\u003c/td\u003e\n\u003ctd\u003eexpands/contracts by adding/subtracting fixed amount\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr class=\"odd\"\u003e\n\u003ctd\u003e*\u003c/td\u003e\n\u003ctd\u003ezooms in (positive) or out (negative) by multiples\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/section\u003e\n\u003csection id=\"inter-range-methods\" class=\"level3\"\u003e\n\u003ch3 class=\"anchored\" data-anchor-id=\"inter-range-methods\"\u003eInter-range methods\u003c/h3\u003e\n\u003cp\u003eAffects ranges as a group\u003c/p\u003e\n\u003ctable class=\"table\"\u003e\n\u003cthead\u003e\n\u003ctr class=\"header\"\u003e\n\u003cth\u003efunction\u003c/th\u003e\n\u003cth\u003edescription\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr class=\"odd\"\u003e\n\u003ctd\u003erange\u003c/td\u003e\n\u003ctd\u003eone range, leftmost start to rightmost end\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr class=\"even\"\u003e\n\u003ctd\u003ereduce\u003c/td\u003e\n\u003ctd\u003ecover all positions with only one range\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr class=\"odd\"\u003e\n\u003ctd\u003egaps\u003c/td\u003e\n\u003ctd\u003euncovered positions within range\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr class=\"even\"\u003e\n\u003ctd\u003edisjoin\u003c/td\u003e\n\u003ctd\u003ebreaks into discrete ranges based on original starts/ends\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/section\u003e\n\u003csection id=\"nearest-methods\" class=\"level3\"\u003e\n\u003ch3 class=\"anchored\" data-anchor-id=\"nearest-methods\"\u003eNearest methods\u003c/h3\u003e\n\u003cp\u003eGiven two sets of ranges, \u003ccode\u003ex\u003c/code\u003e and \u003ccode\u003esubject\u003c/code\u003e, for each range in \u003ccode\u003ex\u003c/code\u003e, returns…\u003c/p\u003e\n\u003ctable class=\"table\"\u003e\n\u003ccolgroup\u003e\n\u003ccol style=\"width: 50%\"\u003e\n\u003ccol style=\"width: 50%\"\u003e\n\u003c/colgroup\u003e\n\u003cthead\u003e\n\u003ctr class=\"header\"\u003e\n\u003cth\u003efunction\u003c/th\u003e\n\u003cth\u003edescription\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr class=\"odd\"\u003e\n\u003ctd\u003enearest\u003c/td\u003e\n\u003ctd\u003eindex of the nearest neighbor range in subject\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr class=\"even\"\u003e\n\u003ctd\u003eprecede\u003c/td\u003e\n\u003ctd\u003eindex of the range in subject that is directly preceded by the range in x\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr class=\"odd\"\u003e\n\u003ctd\u003efollow\u003c/td\u003e\n\u003ctd\u003eindex of the range in subject that is directly followed by the range in x\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr class=\"even\"\u003e\n\u003ctd\u003edistanceToNearest\u003c/td\u003e\n\u003ctd\u003edistances to its nearest neighbor in subject (Hits object)\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr class=\"odd\"\u003e\n\u003ctd\u003edistance\u003c/td\u003e\n\u003ctd\u003edistances to nearest neighbor (integer vector)\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003cp\u003eA Hits object can be accessed with \u003ccode\u003equeryHits\u003c/code\u003e, \u003ccode\u003esubjectHits\u003c/code\u003e and \u003ccode\u003emcols\u003c/code\u003e if a distance is associated.\u003c/p\u003e\n\u003c/section\u003e\n\u003csection id=\"set-methods\" class=\"level3\"\u003e\n\u003ch3 class=\"anchored\" data-anchor-id=\"set-methods\"\u003eset methods\u003c/h3\u003e\n\u003cp\u003eIf \u003ccode\u003ey\u003c/code\u003e is a GRangesList, then use \u003ccode\u003epunion\u003c/code\u003e, etc. All functions have default \u003ccode\u003eignore.strand=FALSE\u003c/code\u003e, so are strand specific.\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003eunion(x,y) \nintersect(x,y)\nsetdiff(x,y)\u003c/code\u003e\u003c/pre\u003e\n\u003c/section\u003e\n\u003csection id=\"overlaps\" class=\"level3\"\u003e\n\u003ch3 class=\"anchored\" data-anchor-id=\"overlaps\"\u003eOverlaps\u003c/h3\u003e\n\u003cpre\u003e\u003ccode\u003ex %over% y  # logical vector of which x overlaps any in y\nfo \u0026lt;- findOverlaps(x,y) # returns a Hits object\nqueryHits(fo)   # which in x\nsubjectHits(fo) # which in y \u003c/code\u003e\u003c/pre\u003e\n\u003c/section\u003e\n\u003csection id=\"seqnames-and-seqlevels\" class=\"level3\"\u003e\n\u003ch3 class=\"anchored\" data-anchor-id=\"seqnames-and-seqlevels\"\u003eSeqnames and seqlevels\u003c/h3\u003e\n\u003cp\u003e\u003ca href=\"http://www.bioconductor.org/packages/release/bioc/html/GenomicRanges.html\"\u003eGenomicRanges\u003c/a\u003e and \u003ca href=\"http://www.bioconductor.org/packages/release/bioc/html/GenomeInfoDb.html\"\u003eGenomeInfoDb\u003c/a\u003e\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003egr.sub \u0026lt;- gr[seqlevels(gr) == \"chr1\"]\nseqlevelsStyle(x) \u0026lt;- \"UCSC\" # convert to 'chr1' style from \"NCBI\" style '1'\u003c/code\u003e\u003c/pre\u003e\n\u003c/section\u003e\n\u003c/section\u003e\n\u003csection id=\"sequences\" class=\"level2\"\u003e\n\u003ch2 class=\"anchored\" data-anchor-id=\"sequences\"\u003eSequences\u003c/h2\u003e\n\u003cp\u003e\u003ca href=\"http://www.bioconductor.org/packages/release/bioc/html/Biostrings.html\"\u003eBiostrings\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003esee the \u003ca href=\"http://www.bioconductor.org/packages/release/bioc/vignettes/Biostrings/inst/doc/BiostringsQuickOverview.pdf\"\u003eBiostrings Quick Overview PDF\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eFor naming, see \u003ca href=\"http://genomicsclass.github.io/book/pages/annoCheat.html\"\u003echeat sheet for annotation\u003c/a\u003e\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003elibrary(BSgenome.Hsapiens.UCSC.hg19)\ndnastringset \u0026lt;- getSeq(Hsapiens, granges) # returns a DNAStringSet\n# also Views() for Bioconductor \u0026gt;= 3.1\u003c/code\u003e\u003c/pre\u003e\n\u003cpre\u003e\u003ccode\u003elibrary(Biostrings)\ndnastringset \u0026lt;- readDNAStringSet(\"transcripts.fa\")\u003c/code\u003e\u003c/pre\u003e\n\u003cpre\u003e\u003ccode\u003esubstr(dnastringset, 1, 10) # to character string\nsubseq(dnastringset, 1, 10) # returns DNAStringSet\nViews(dnastringset, 1, 10) # lightweight views into object\ncomplement(dnastringset)\nreverseComplement(dnastringset)\nmatchPattern(\"ACGTT\", dnastring) # also countPattern, also works on Hsapiens/genome\nvmatchPattern(\"ACGTT\", dnastringset) # also vcountPattern\nletterFrequecy(dnastringset, \"CG\") # how many C's or G's\n# also letterFrequencyInSlidingView\nalphabetFrequency(dnastringset, as.prob=TRUE)\n# also oligonucleotideFrequency, dinucleotideFrequency, trinucleotideFrequency\n# transcribe/translate for imitating biological processes\u003c/code\u003e\u003c/pre\u003e\n\u003c/section\u003e\n\u003csection id=\"sequencing-data\" class=\"level2\"\u003e\n\u003ch2 class=\"anchored\" data-anchor-id=\"sequencing-data\"\u003eSequencing data\u003c/h2\u003e\n\u003cp\u003e\u003ca href=\"http://www.bioconductor.org/packages/release/bioc/html/Rsamtools.html\"\u003eRsamtools\u003c/a\u003e \u003ccode\u003escanBam\u003c/code\u003e returns lists of raw values from BAM files\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003elibrary(Rsamtools)\nwhich \u0026lt;- GRanges(\"chr1\",IRanges(1000001,1001000))\nwhat \u0026lt;- c(\"rname\",\"strand\",\"pos\",\"qwidth\",\"seq\")\nparam \u0026lt;- ScanBamParam(which=which, what=what)\n# for more BamFile functions/details see ?BamFile\n# yieldSize for chunk-wise access\nbamfile \u0026lt;- BamFile(\"/path/to/file.bam\")\nreads \u0026lt;- scanBam(bamfile, param=param)\nres \u0026lt;- countBam(bamfile, param=param) \n# for more sophisticated counting modes\n# see summarizeOverlaps() below\n\n# quickly check chromosome names\nseqinfo(BamFile(\"/path/to/file.bam\"))\n\n# DNAStringSet is defined in the Biostrings package\n# see the Biostrings Quick Overview PDF\ndnastringset \u0026lt;- scanFa(fastaFile, param=granges)\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003e\u003ca href=\"http://www.bioconductor.org/packages/release/bioc/html/GenomicAlignments.html\"\u003eGenomicAlignments\u003c/a\u003e returns Bioconductor objects (GRanges-based)\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003elibrary(GenomicAlignments)\nga \u0026lt;- readGAlignments(bamfile) # single-end\nga \u0026lt;- readGAlignmentPairs(bamfile) # paired-end\u003c/code\u003e\u003c/pre\u003e\n\u003c/section\u003e\n\u003csection id=\"transcript-databases\" class=\"level2\"\u003e\n\u003ch2 class=\"anchored\" data-anchor-id=\"transcript-databases\"\u003eTranscript databases\u003c/h2\u003e\n\u003cp\u003e\u003ca href=\"http://www.bioconductor.org/packages/release/bioc/html/GenomicFeatures.html\"\u003eGenomicFeatures\u003c/a\u003e\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e# get a transcript database, which stores exon, trancript, and gene information\nlibrary(GenomicFeatures)\nlibrary(TxDb.Hsapiens.UCSC.hg19.knownGene)\ntxdb \u0026lt;- TxDb.Hsapiens.UCSC.hg19.knownGene\n\n# or build a txdb from GTF file (e.g. downloadable from Ensembl FTP site)\ntxdb \u0026lt;- makeTranscriptDbFromGFF(\"file.GTF\", format=\"gtf\")\n\n# or build a txdb from Biomart (however, not as easy to reproduce later)\ntxdb \u0026lt;- makeTranscriptDbFromBiomart(biomart = \"ensembl\", dataset = \"hsapiens_gene_ensembl\")\n\n# in Bioconductor \u0026gt;= 3.1, also makeTxDbFromGRanges\n\n# saving and loading\nsaveDb(txdb, file=\"txdb.sqlite\")\nloadDb(\"txdb.sqlite\")\n\n# extracting information from txdb\ng \u0026lt;- genes(txdb) # GRanges, just start to end, no exon/intron information\ntx \u0026lt;- transcripts(txdb) # GRanges, similar to genes()\ne \u0026lt;- exons(txdb) # GRanges for each exon\nebg \u0026lt;- exonsBy(txdb, by=\"gene\") # exons grouped in a GRangesList by gene\nebt \u0026lt;- exonsBy(txdb, by=\"tx\") # similar but by transcript\n\n# then get the transcript sequence\ntxSeq \u0026lt;- extractTranscriptSeqs(Hsapiens, ebt)\u003c/code\u003e\u003c/pre\u003e\n\u003c/section\u003e\n\u003csection id=\"summarizing-information-across-ranges-and-experiments\" class=\"level2\"\u003e\n\u003ch2 class=\"anchored\" data-anchor-id=\"summarizing-information-across-ranges-and-experiments\"\u003eSummarizing information across ranges and experiments\u003c/h2\u003e\n\u003cp\u003eThe SummarizedExperiment is a storage class for high-dimensional information tied to the same GRanges or GRangesList across experiments (e.g., read counts in exons for each gene).\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003elibrary(GenomicAlignments)\nfls \u0026lt;- list.files(pattern=\"*.bam$\")\nlibrary(TxDb.Hsapiens.UCSC.hg19.knownGene)\ntxdb \u0026lt;- TxDb.Hsapiens.UCSC.hg19.knownGene\nebg \u0026lt;- exonsBy(txdb, by=\"gene\")\n# see yieldSize argument for restricting memory\nbf \u0026lt;- BamFileList(fls)\nlibrary(BiocParallel)\nregister(MulticoreParam(4))\n# lots of options in the man page\n# singleEnd, ignore.strand, inter.features, fragments, etc.\nse \u0026lt;- summarizeOverlaps(ebg, bf)\n\n# operations on SummarizedExperiment\nassay(se) # the counts from summarizeOverlaps\ncolData(se)\nrowRanges(se)\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eMy preferred quantification method is \u003ca href=\"https://combine-lab.github.io/salmon/\"\u003eSalmon\u003c/a\u003e, with \u003ccode\u003e--gcBias\u003c/code\u003e option enabled unless you know there is no GC dependence in the data, followed by \u003ca href=\"http://bioconductor.org/pacakges/tximport\"\u003etximport\u003c/a\u003e. Here is an example of usage:\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003ecoldata \u0026lt;- read.table(\"samples.txt\")\nrownames(coldata) \u0026lt;- coldata$id\nfiles \u0026lt;- coldata$files; names(files) \u0026lt;- coldata$id\ntxi \u0026lt;- tximport(files, type=\"salmon\", tx2gene=tx2gene)\ndds \u0026lt;- DESeqDataSetFromTximport(txi, coldata, ~condition)\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eAnother fast Bioconductor read counting method is featureCounts in \u003ca href=\"http://www.bioconductor.org/packages/release/bioc/html/Rsubread.html\"\u003eRsubread\u003c/a\u003e.\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003elibrary(Rsubread)\nres \u0026lt;- featureCounts(files, annot.ext=\"annotation.gtf\",\n  isGTFAnnotationFile=TRUE,\n  GTF.featureType=\"exon\",\n  GTF.attrType=\"gene_id\")\nres$counts\u003c/code\u003e\u003c/pre\u003e\n\u003c/section\u003e\n\u003csection id=\"rna-seq-gene-wise-analysis\" class=\"level2\"\u003e\n\u003ch2 class=\"anchored\" data-anchor-id=\"rna-seq-gene-wise-analysis\"\u003eRNA-seq gene-wise analysis\u003c/h2\u003e\n\u003cp\u003e\u003ca href=\"http://www.bioconductor.org/packages/release/bioc/html/DESeq2.html\"\u003eDESeq2\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eMy preferred pipeline for DESeq2 users is to start with a lightweight transcript abundance quantifier such as \u003ca href=\"https://combine-lab.github.io/salmon/\"\u003eSalmon\u003c/a\u003e and to use \u003ca href=\"http://bioconductor.org/packages/tximport\"\u003etximport\u003c/a\u003e, followed by \u003ccode\u003eDESeqDataSetFromTximport\u003c/code\u003e.\u003c/p\u003e\n\u003cp\u003eHere, \u003ccode\u003ecoldata\u003c/code\u003e is a \u003cem\u003edata.frame\u003c/em\u003e with \u003ccode\u003egroup\u003c/code\u003e as a column.\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003elibrary(DESeq2)\n# from tximport\ndds \u0026lt;- DESeqDataSetFromTximport(txi, coldata, ~ group)\n# from SummarizedExperiment\ndds \u0026lt;- DESeqDataSet(se, ~ group)\n# from count matrix\ndds \u0026lt;- DESeqDataSetFromMatrix(counts, coldata, ~ group)\n# minimal filtering helps keep things fast \n# one can set 'n' to e.g. min(5, smallest group sample size)\nkeep \u0026lt;- rowSums(counts(dds) \u0026gt;= 10) \u0026gt;= n \ndds \u0026lt;- dds[keep,]\ndds \u0026lt;- DESeq(dds)\nres \u0026lt;- results(dds) # no shrinkage of LFC, or:\nres \u0026lt;- lfcShrink(dds, coef = 2, type=\"apeglm\") # shrink LFCs\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003e\u003ca href=\"http://www.bioconductor.org/packages/release/bioc/html/edgeR.html\"\u003eedgeR\u003c/a\u003e\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e# this chunk from the Quick start in the edgeR User Guide\nlibrary(edgeR) \ny \u0026lt;- DGEList(counts=counts,group=group)\nkeep \u0026lt;- filterByExpr(y)\ny \u0026lt;- y[keep,]\ny \u0026lt;- calcNormFactors(y)\ndesign \u0026lt;- model.matrix(~group)\ny \u0026lt;- estimateDisp(y,design)\nfit \u0026lt;- glmFit(y,design)\nlrt \u0026lt;- glmLRT(fit)\ntopTags(lrt)\n# or use the QL methods:\nqlfit \u0026lt;- glmQLFit(y,design)\nqlft \u0026lt;- glmQLFTest(qlfit)\ntopTags(qlft)\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003e\u003ca href=\"http://www.bioconductor.org/packages/release/bioc/html/limma.html\"\u003elimma-voom\u003c/a\u003e\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003elibrary(limma)\ndesign \u0026lt;- model.matrix(~ group)\ny \u0026lt;- DGEList(counts)\nkeep \u0026lt;- filterByExpr(y)\ny \u0026lt;- y[keep,]\ny \u0026lt;- calcNormFactors(y)\nv \u0026lt;- voom(y,design)\nfit \u0026lt;- lmFit(v,design)\nfit \u0026lt;- eBayes(fit)\ntopTable(fit)\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003e\u003ca href=\"http://www.bioconductor.org/packages/release/BiocViews.html#___RNASeq\"\u003eMany more RNA-seq packages\u003c/a\u003e\u003c/p\u003e\n\u003c/section\u003e\n\u003csection id=\"expression-set\" class=\"level2\"\u003e\n\u003ch2 class=\"anchored\" data-anchor-id=\"expression-set\"\u003eExpression set\u003c/h2\u003e\n\u003cpre\u003e\u003ccode\u003elibrary(Biobase)\ndata(sample.ExpressionSet)\ne \u0026lt;- sample.ExpressionSet\nexprs(e)\npData(e)\nfData(e)\u003c/code\u003e\u003c/pre\u003e\n\u003c/section\u003e\n\u003csection id=\"get-geo-dataset\" class=\"level2\"\u003e\n\u003ch2 class=\"anchored\" data-anchor-id=\"get-geo-dataset\"\u003eGet GEO dataset\u003c/h2\u003e\n\u003cpre\u003e\u003ccode\u003elibrary(GEOquery)\ne \u0026lt;- getGEO(\"GSE9514\")\u003c/code\u003e\u003c/pre\u003e\n\u003c/section\u003e\n\u003csection id=\"microarray-analysis\" class=\"level2\"\u003e\n\u003ch2 class=\"anchored\" data-anchor-id=\"microarray-analysis\"\u003eMicroarray analysis\u003c/h2\u003e\n\u003cpre\u003e\u003ccode\u003elibrary(affy)\nlibrary(limma)\nphenoData \u0026lt;- read.AnnotatedDataFrame(\"sample-description.csv\")\neset \u0026lt;- justRMA(\"/celfile-directory\", phenoData=phenoData)\ndesign \u0026lt;- model.matrix(~ Disease, pData(eset))\nfit \u0026lt;- lmFit(eset, design)\nefit \u0026lt;- eBayes(fit)\ntopTable(efit, coef=2)\u003c/code\u003e\u003c/pre\u003e\n\u003c/section\u003e\n\u003csection id=\"icobra-performance-metrics\" class=\"level2\"\u003e\n\u003ch2 class=\"anchored\" data-anchor-id=\"icobra-performance-metrics\"\u003eiCOBRA performance metrics\u003c/h2\u003e\n\u003cpre\u003e\u003ccode\u003elibrary(iCOBRA)\ncd \u0026lt;- COBRAData(pval=pval.df, padj=padj.df, score=score.df, truth=truth.df)\ncp \u0026lt;- calculate_performance(cd, binary_truth = \"status\", cont_truth = \"logFC\")\ncobraplot \u0026lt;- prepare_data_for_plot(cp)\nplot_fdrtprcurve(cobraplot)\n# interactive shiny app:\nCOBRAapp(cd)\u003c/code\u003e\u003c/pre\u003e\n\u003c/section\u003e\n\n\u003c/main\u003e\n\u003c!-- /main column --\u003e\n\u003cscript id=\"quarto-html-after-body\" type=\"application/javascript\"\u003e\nwindow.document.addEventListener(\"DOMContentLoaded\", function (event) {\n  const toggleBodyColorMode = (bsSheetEl) =\u003e {\n    const mode = bsSheetEl.getAttribute(\"data-mode\");\n    const bodyEl = window.document.querySelector(\"body\");\n    if (mode === \"dark\") {\n      bodyEl.classList.add(\"quarto-dark\");\n      bodyEl.classList.remove(\"quarto-light\");\n    } else {\n      bodyEl.classList.add(\"quarto-light\");\n      bodyEl.classList.remove(\"quarto-dark\");\n    }\n  }\n  const toggleBodyColorPrimary = () =\u003e {\n    const bsSheetEl = window.document.querySelector(\"link#quarto-bootstrap\");\n    if (bsSheetEl) {\n      toggleBodyColorMode(bsSheetEl);\n    }\n  }\n  toggleBodyColorPrimary();  \n  const icon = \"\";\n  const anchorJS = new window.AnchorJS();\n  anchorJS.options = {\n    placement: 'right',\n    icon: icon\n  };\n  anchorJS.add('.anchored');\n  const isCodeAnnotation = (el) =\u003e {\n    for (const clz of el.classList) {\n      if (clz.startsWith('code-annotation-')) {                     \n        return true;\n      }\n    }\n    return false;\n  }\n  const clipboard = new window.ClipboardJS('.code-copy-button', {\n    text: function(trigger) {\n      const codeEl = trigger.previousElementSibling.cloneNode(true);\n      for (const childEl of codeEl.children) {\n        if (isCodeAnnotation(childEl)) {\n          childEl.remove();\n        }\n      }\n      return codeEl.innerText;\n    }\n  });\n  clipboard.on('success', function(e) {\n    // button target\n    const button = e.trigger;\n    // don't keep focus\n    button.blur();\n    // flash \"checked\"\n    button.classList.add('code-copy-button-checked');\n    var currentTitle = button.getAttribute(\"title\");\n    button.setAttribute(\"title\", \"Copied!\");\n    let tooltip;\n    if (window.bootstrap) {\n      button.setAttribute(\"data-bs-toggle\", \"tooltip\");\n      button.setAttribute(\"data-bs-placement\", \"left\");\n      button.setAttribute(\"data-bs-title\", \"Copied!\");\n      tooltip = new bootstrap.Tooltip(button, \n        { trigger: \"manual\", \n          customClass: \"code-copy-button-tooltip\",\n          offset: [0, -8]});\n      tooltip.show();    \n    }\n    setTimeout(function() {\n      if (tooltip) {\n        tooltip.hide();\n        button.removeAttribute(\"data-bs-title\");\n        button.removeAttribute(\"data-bs-toggle\");\n        button.removeAttribute(\"data-bs-placement\");\n      }\n      button.setAttribute(\"title\", currentTitle);\n      button.classList.remove('code-copy-button-checked');\n    }, 1000);\n    // clear code selection\n    e.clearSelection();\n  });\n  function tippyHover(el, contentFn) {\n    const config = {\n      allowHTML: true,\n      content: contentFn,\n      maxWidth: 500,\n      delay: 100,\n      arrow: false,\n      appendTo: function(el) {\n          return el.parentElement;\n      },\n      interactive: true,\n      interactiveBorder: 10,\n      theme: 'quarto',\n      placement: 'bottom-start'\n    };\n    window.tippy(el, config); \n  }\n  const noterefs = window.document.querySelectorAll('a[role=\"doc-noteref\"]');\n  for (var i=0; i\u003cnoterefs.length; i++) {\n    const ref = noterefs[i];\n    tippyHover(ref, function() {\n      // use id or data attribute instead here\n      let href = ref.getAttribute('data-footnote-href') || ref.getAttribute('href');\n      try { href = new URL(href).hash; } catch {}\n      const id = href.replace(/^#\\/?/, \"\");\n      const note = window.document.getElementById(id);\n      return note.innerHTML;\n    });\n  }\n      let selectedAnnoteEl;\n      const selectorForAnnotation = ( cell, annotation) =\u003e {\n        let cellAttr = 'data-code-cell=\"' + cell + '\"';\n        let lineAttr = 'data-code-annotation=\"' +  annotation + '\"';\n        const selector = 'span[' + cellAttr + '][' + lineAttr + ']';\n        return selector;\n      }\n      const selectCodeLines = (annoteEl) =\u003e {\n        const doc = window.document;\n        const targetCell = annoteEl.getAttribute(\"data-target-cell\");\n        const targetAnnotation = annoteEl.getAttribute(\"data-target-annotation\");\n        const annoteSpan = window.document.querySelector(selectorForAnnotation(targetCell, targetAnnotation));\n        const lines = annoteSpan.getAttribute(\"data-code-lines\").split(\",\");\n        const lineIds = lines.map((line) =\u003e {\n          return targetCell + \"-\" + line;\n        })\n        let top = null;\n        let height = null;\n        let parent = null;\n        if (lineIds.length \u003e 0) {\n            //compute the position of the single el (top and bottom and make a div)\n            const el = window.document.getElementById(lineIds[0]);\n            top = el.offsetTop;\n            height = el.offsetHeight;\n            parent = el.parentElement.parentElement;\n          if (lineIds.length \u003e 1) {\n            const lastEl = window.document.getElementById(lineIds[lineIds.length - 1]);\n            const bottom = lastEl.offsetTop + lastEl.offsetHeight;\n            height = bottom - top;\n          }\n          if (top !== null \u0026\u0026 height !== null \u0026\u0026 parent !== null) {\n            // cook up a div (if necessary) and position it \n            let div = window.document.getElementById(\"code-annotation-line-highlight\");\n            if (div === null) {\n              div = window.document.createElement(\"div\");\n              div.setAttribute(\"id\", \"code-annotation-line-highlight\");\n              div.style.position = 'absolute';\n              parent.appendChild(div);\n            }\n            div.style.top = top - 2 + \"px\";\n            div.style.height = height + 4 + \"px\";\n            let gutterDiv = window.document.getElementById(\"code-annotation-line-highlight-gutter\");\n            if (gutterDiv === null) {\n              gutterDiv = window.document.createElement(\"div\");\n              gutterDiv.setAttribute(\"id\", \"code-annotation-line-highlight-gutter\");\n              gutterDiv.style.position = 'absolute';\n              const codeCell = window.document.getElementById(targetCell);\n              const gutter = codeCell.querySelector('.code-annotation-gutter');\n              gutter.appendChild(gutterDiv);\n            }\n            gutterDiv.style.top = top - 2 + \"px\";\n            gutterDiv.style.height = height + 4 + \"px\";\n          }\n          selectedAnnoteEl = annoteEl;\n        }\n      };\n      const unselectCodeLines = () =\u003e {\n        const elementsIds = [\"code-annotation-line-highlight\", \"code-annotation-line-highlight-gutter\"];\n        elementsIds.forEach((elId) =\u003e {\n          const div = window.document.getElementById(elId);\n          if (div) {\n            div.remove();\n          }\n        });\n        selectedAnnoteEl = undefined;\n      };\n      // Attach click handler to the DT\n      const annoteDls = window.document.querySelectorAll('dt[data-target-cell]');\n      for (const annoteDlNode of annoteDls) {\n        annoteDlNode.addEventListener('click', (event) =\u003e {\n          const clickedEl = event.target;\n          if (clickedEl !== selectedAnnoteEl) {\n            unselectCodeLines();\n            const activeEl = window.document.querySelector('dt[data-target-cell].code-annotation-active');\n            if (activeEl) {\n              activeEl.classList.remove('code-annotation-active');\n            }\n            selectCodeLines(clickedEl);\n            clickedEl.classList.add('code-annotation-active');\n          } else {\n            // Unselect the line\n            unselectCodeLines();\n            clickedEl.classList.remove('code-annotation-active');\n          }\n        });\n      }\n  const findCites = (el) =\u003e {\n    const parentEl = el.parentElement;\n    if (parentEl) {\n      const cites = parentEl.dataset.cites;\n      if (cites) {\n        return {\n          el,\n          cites: cites.split(' ')\n        };\n      } else {\n        return findCites(el.parentElement)\n      }\n    } else {\n      return undefined;\n    }\n  };\n  var bibliorefs = window.document.querySelectorAll('a[role=\"doc-biblioref\"]');\n  for (var i=0; i\u003cbibliorefs.length; i++) {\n    const ref = bibliorefs[i];\n    const citeInfo = findCites(ref);\n    if (citeInfo) {\n      tippyHover(citeInfo.el, function() {\n        var popup = window.document.createElement('div');\n        citeInfo.cites.forEach(function(cite) {\n          var citeDiv = window.document.createElement('div');\n          citeDiv.classList.add('hanging-indent');\n          citeDiv.classList.add('csl-entry');\n          var biblioDiv = window.document.getElementById('ref-' + cite);\n          if (biblioDiv) {\n            citeDiv.innerHTML = biblioDiv.innerHTML;\n          }\n          popup.appendChild(citeDiv);\n        });\n        return popup.innerHTML;\n      });\n    }\n  }\n});\n\u003c/script\u003e\n\u003c/div\u003e \u003c!-- /content --\u003e\n\n\n\n\u003c/body\u003e\u003c/html\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikelove%2Fbioc-refcard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikelove%2Fbioc-refcard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikelove%2Fbioc-refcard/lists"}