![Page 2: Single cell RNA sequencing data analysis Practical exercises · case, update your gitrepo with command ”git ... pbl/glossary_of_terms_single_cell.html. Rmarkdowndemonstration. Title:](https://reader035.vdocuments.us/reader035/viewer/2022081621/612df3061ecc515869428195/html5/thumbnails/2.jpg)
Practicalonzoom
• Workingroupsof5,theideaisthatyoucanhelpeachotheroutanddiscussresults.
• Onezoombreakoutroompergroup,youshouldhavealreadybeenassignedtoagroupinslack.Pleasestayonlineinthebreakoutroomforyourgroup.
• Cometomainroomforquestionortellusonslackanwecancometoyourbreakoutroom.
• Wehavesomeextraroomswherewecansitwithastudentiftherearespecificquestions.
![Page 3: Single cell RNA sequencing data analysis Practical exercises · case, update your gitrepo with command ”git ... pbl/glossary_of_terms_single_cell.html. Rmarkdowndemonstration. Title:](https://reader035.vdocuments.us/reader035/viewer/2022081621/612df3061ecc515869428195/html5/thumbnails/3.jpg)
https://nbisweden.github.io/workshop-scRNAseq/exercises
![Page 4: Single cell RNA sequencing data analysis Practical exercises · case, update your gitrepo with command ”git ... pbl/glossary_of_terms_single_cell.html. Rmarkdowndemonstration. Title:](https://reader035.vdocuments.us/reader035/viewer/2022081621/612df3061ecc515869428195/html5/thumbnails/4.jpg)
Threemainpipelinesforanalysing singlecelldata:• Seurat:
• Rbased,centeredaroundSeuratobjects.• Mainlydevelopedfordropletbaseddata• Easytouse,recommendedforRbeginners• Cons:usesaLOTofmemory
• Scran:• Rbased,centeredaroundSingleCellExperiment objects• Hasmoredifferentstatisticalmethods• Canhandlespike-ins• Cons:MorecomplicatedthanSeurattorun.
• Scanpy:• Pythonbased• Handleslargedatasetsbetter.• Cons:Requiresquitesomepythonknowledge.DoesnotyethaveallthefunctionalityoftheRbasedtools
![Page 5: Single cell RNA sequencing data analysis Practical exercises · case, update your gitrepo with command ”git ... pbl/glossary_of_terms_single_cell.html. Rmarkdowndemonstration. Title:](https://reader035.vdocuments.us/reader035/viewer/2022081621/612df3061ecc515869428195/html5/thumbnails/5.jpg)
Seuratobject
https://github.com/satijalab/seurat/wiki/Seurat
![Page 6: Single cell RNA sequencing data analysis Practical exercises · case, update your gitrepo with command ”git ... pbl/glossary_of_terms_single_cell.html. Rmarkdowndemonstration. Title:](https://reader035.vdocuments.us/reader035/viewer/2022081621/612df3061ecc515869428195/html5/thumbnails/6.jpg)
SingleCellExperiment (SCE)objects
https://bioconductor.org/packages/release/bioc/vignettes/SingleCellExperiment/inst/doc/intro.html
![Page 7: Single cell RNA sequencing data analysis Practical exercises · case, update your gitrepo with command ”git ... pbl/glossary_of_terms_single_cell.html. Rmarkdowndemonstration. Title:](https://reader035.vdocuments.us/reader035/viewer/2022081621/612df3061ecc515869428195/html5/thumbnails/7.jpg)
AnnData (Scanpy)objets
https://anndata.readthedocs.io/en/latest/anndata.AnnData.html
![Page 8: Single cell RNA sequencing data analysis Practical exercises · case, update your gitrepo with command ”git ... pbl/glossary_of_terms_single_cell.html. Rmarkdowndemonstration. Title:](https://reader035.vdocuments.us/reader035/viewer/2022081621/612df3061ecc515869428195/html5/thumbnails/8.jpg)
Whattochose?
• Itisrecommendedthatyougothroughallthestepswithonepipelineaseachexercisedependsonsavedobjectsfromthepreviousstep.
• Everyoneworksinverydifferentpace.Focusononeofthepipelinesfirst.Ifyouhavetimeleftover,youcanalsotryouttheotherones.
![Page 9: Single cell RNA sequencing data analysis Practical exercises · case, update your gitrepo with command ”git ... pbl/glossary_of_terms_single_cell.html. Rmarkdowndemonstration. Title:](https://reader035.vdocuments.us/reader035/viewer/2022081621/612df3061ecc515869428195/html5/thumbnails/9.jpg)
Thedatasets– Covid-19PBMCs
• Elderlypatientsusuallydevelopseverelunginflammationandlungdisfunction.
• Manycelltypesorchestratetheimmuneresponsetothevirus.
• Theirrelativecontributionatthesingle-cellresolutionisstillunclear
GOAL:Whichcelltypesandgenesarealteredwhencomparingbloodimmunecellsfromhealty vsdisease?
![Page 10: Single cell RNA sequencing data analysis Practical exercises · case, update your gitrepo with command ”git ... pbl/glossary_of_terms_single_cell.html. Rmarkdowndemonstration. Title:](https://reader035.vdocuments.us/reader035/viewer/2022081621/612df3061ecc515869428195/html5/thumbnails/10.jpg)
Thedatasets– Covid-19PBMCs
• Datafrompaper:”Immunophenotyping ofCOVID-19andinfluenzahighlightstheroleoftypeIinterferonsindevelopmentofsevereCOVID-19”Leeetal.SciImmuno
• Wehaveselected3controlsand3severecovidsamplesandsubsampledto1500cellspersubjectforcomputationalspeed/memory.
• STandtrajectorylabwillbewithotherdatasets.
![Page 11: Single cell RNA sequencing data analysis Practical exercises · case, update your gitrepo with command ”git ... pbl/glossary_of_terms_single_cell.html. Rmarkdowndemonstration. Title:](https://reader035.vdocuments.us/reader035/viewer/2022081621/612df3061ecc515869428195/html5/thumbnails/11.jpg)
Installationofallpackages
• Wehavecreatedaconda environmentforthecoursethatshouldcontainallpackagesyouneedfortheexercises
• However,forslingshottrajectoryinferencelab,thereisanadditionalconda environmentthatneedstobeinstalled.
• IfyouchosetoinsteadworkwithstandardRinstallations,youcanusethelistofrequiredpackagesintheenvironmentfileandinstallthemonyourown.
![Page 12: Single cell RNA sequencing data analysis Practical exercises · case, update your gitrepo with command ”git ... pbl/glossary_of_terms_single_cell.html. Rmarkdowndemonstration. Title:](https://reader035.vdocuments.us/reader035/viewer/2022081621/612df3061ecc515869428195/html5/thumbnails/12.jpg)
Whyconda?
• OfteneasierinstallationscomparedtotraditionalRinstallationforpackageswithC-compilationetc.
• Goodwaytomanagedifferentversionsofpackagesindifferentprojects.
• Thereareotherwaysofmanagingpackages.E.gpackratforR,pyenv forpythonetc.
![Page 13: Single cell RNA sequencing data analysis Practical exercises · case, update your gitrepo with command ”git ... pbl/glossary_of_terms_single_cell.html. Rmarkdowndemonstration. Title:](https://reader035.vdocuments.us/reader035/viewer/2022081621/612df3061ecc515869428195/html5/thumbnails/13.jpg)
Thecode:
• AllcodefortheexercisesisavailableasR-markdowndocuments,orjupyter notebooks,inthefolder:workshop-scRNAseq/labs/compiled/
• Pleasereporttousifyoufindanyerrorsinthecode!– Slackchannel#exercises– AnIssueonthegithub page.
• Wemayfindbugsandupdatethecode– inthatcase,updateyourgit repowithcommand”gitpull”
![Page 14: Single cell RNA sequencing data analysis Practical exercises · case, update your gitrepo with command ”git ... pbl/glossary_of_terms_single_cell.html. Rmarkdowndemonstration. Title:](https://reader035.vdocuments.us/reader035/viewer/2022081621/612df3061ecc515869428195/html5/thumbnails/14.jpg)
Reproduciblecoding
• Youshouldalwaysbeabletofindandrecreatetheresults.– Scriptsshouldbeabletorunfrominputfilestocreatetheoutput.
– NeverworkwithsavedRsessions!
• Nameyourscriptswithrelevantnamessoyoucanfindthem2yearslaterJ
• Alwaysbackupcode– goodideatousegithub thatalsogivesyouversioncontrol.
![Page 15: Single cell RNA sequencing data analysis Practical exercises · case, update your gitrepo with command ”git ... pbl/glossary_of_terms_single_cell.html. Rmarkdowndemonstration. Title:](https://reader035.vdocuments.us/reader035/viewer/2022081621/612df3061ecc515869428195/html5/thumbnails/15.jpg)
MemoryissuesinR
• scRNAseq datasetsareoftenlarge,thinkabouthowyoucode.Avoidduplicatingobjects!
• Removeunusedmatricesandclearmemorywithgc().
• MostpackagesstorescRNAseq assparsematrices,willrequirepackageMatrixorsimilarformanystandardmatrixoperations.
• IfyoustillhaveissueswithmemoryinR,testsettinge.g.R_MAX_VSIZE=70Gb inthe.Renviron file.Defaultis16Gb.
![Page 16: Single cell RNA sequencing data analysis Practical exercises · case, update your gitrepo with command ”git ... pbl/glossary_of_terms_single_cell.html. Rmarkdowndemonstration. Title:](https://reader035.vdocuments.us/reader035/viewer/2022081621/612df3061ecc515869428195/html5/thumbnails/16.jpg)
Troubleshooting
• Slackchannel- #exercises
• Itisimportantthatyoulearnhowtotroubleshootyourselves.– Lookatyourerrormessages,perhapstheansweristhere?– Ifnot– Googleisyourbestfriend!ForumslikeSeqanswers,Stackexchange,Bioconductorsupportforum,specificforums(orgithub issues)foreachpackagemayhavetheanswer.
• TAsaretheretoansweranyquestionsandgivesuggestions,butwemaynotalwayshavetheanswer.
![Page 17: Single cell RNA sequencing data analysis Practical exercises · case, update your gitrepo with command ”git ... pbl/glossary_of_terms_single_cell.html. Rmarkdowndemonstration. Title:](https://reader035.vdocuments.us/reader035/viewer/2022081621/612df3061ecc515869428195/html5/thumbnails/17.jpg)
https://nbisweden.github.io/single-cell-pbl/glossary_of_terms_single_cell.html
![Page 18: Single cell RNA sequencing data analysis Practical exercises · case, update your gitrepo with command ”git ... pbl/glossary_of_terms_single_cell.html. Rmarkdowndemonstration. Title:](https://reader035.vdocuments.us/reader035/viewer/2022081621/612df3061ecc515869428195/html5/thumbnails/18.jpg)
Rmarkdown demonstration