An introduction to Snakemake tutorial for beginners (CC248)

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ส.ค. 2024
  • Snakemake is a powerful tool for keeping track of data dependencies and to automate data analysis pipelines. In this episode of Code Club, Pat Shares how to install snakemake, convert a driver script to a simple Snakemake file, troubleshoot problems, create rules, use parameters, and test snakemake files. The overall goal of this project is to highlight reproducible research practices using a number of tools. The specific output from this project will be a map-based visual that shows the level of drought across the globe.
    You can find my blog post for this episode at www.riffomonas.org/code_club/....
    #snakemake #conda #bash #R #Rstats
    Support Riffomonas by becoming a Patreon member!
    / riffomonas
    Want more practice on the concepts covered in Code Club? You can sign up for my weekly newsletter at shop.riffomonas.org/youtube to get practice problems, tips, and insights.
    If you're interested in taking an upcoming 3 day R workshop be sure to check out our schedule at riffomonas.org/workshops/
    You can also find complete tutorials for learning R with the tidyverse using...
    Microbial ecology data: www.riffomonas.org/minimalR/
    General data: www.riffomonas.org/generalR/
    0:00 Introduction
    3:30 Our first Snakemake rule
    6:41 Installing snakemake with conda/mamba
    9:33 Testing snakefile with --dry-run or -np
    18:43 Creating and using a targets rule
    21:13 Running snakefile
    25:08 Visualizing the DAG
    27:49 Cleaning up
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 23

  • @ABHISHEKKUMAR-ie3hl
    @ABHISHEKKUMAR-ie3hl ปีที่แล้ว +2

    fantastic and straight to the point introduction to Snakemake. Great Job! 🙌👏

  • @danhatechav
    @danhatechav ปีที่แล้ว +3

    Fantastic! Thank you very much. Looking forward to watching this one.

    • @Riffomonas
      @Riffomonas  ปีที่แล้ว

      wonderful - let me know if you have any questions of things you'd like to see me cover about snakemake. i've really grown to love it over GNU Make

  • @denizural5390
    @denizural5390 ปีที่แล้ว +1

    Great tutorial. Thank you very much 👏👏

  • @sven9r
    @sven9r ปีที่แล้ว +9

    Hey Pat,
    I don't know how you do it, but we are currently working on a wiki for our lab. Where we are creating tutorials for projects controlled via conda, snakemake and gith.
    So this series has so much value for me and the other Phd students! Cheers !

    • @Riffomonas
      @Riffomonas  ปีที่แล้ว +1

      wonderful! thanks for your continued support

  • @hilalsukanar3315
    @hilalsukanar3315 ปีที่แล้ว +1

    Great video, thanks!

  • @ailtonpereira1033
    @ailtonpereira1033 ปีที่แล้ว +1

    Really cool video, definitely will help my research!

    • @Riffomonas
      @Riffomonas  ปีที่แล้ว +2

      Awesome, thank you! 🤓

  • @geparada88
    @geparada88 ปีที่แล้ว +1

    This is a good intro video! I will show this to a rotation student that seems to be interested in learning snakemake - Thanks a lot.
    The only thing I found a little bit confusing is that for running your script you required {params.file} instead of directly using {output}. I guess this is because your script is just taking the name of the output file and automatically saving this in a folder called "data". Perhaps you could have explained this, as most of the time you don't need to specify output files as {params}.

    • @Riffomonas
      @Riffomonas  ปีที่แล้ว

      Thanks for watching and for the feedback!

  • @musicspinner
    @musicspinner ปีที่แล้ว +2

    Fantastic. 👌🏽
    This is incredibly useful.
    Related to this, have you worked with R `library(drake)` or its successor `library(targets)`? If so, any thoughts related those R-specific workflow management systems? I could see them being quite handy for improving Shiny app efficiency or just interactive R exploration of some computationally heavy analysis.

    • @Riffomonas
      @Riffomonas  ปีที่แล้ว +1

      Thanks for watching! I think the modern version of {drake} is {targets}. I rarely do everything in R so I like the flexibility of being able to mix languages and programs with snakemake.

  • @ricrocha821
    @ricrocha821 ปีที่แล้ว +1

    Hi!! The videos are incredible. Learning so much!! I would like to mention we need to install snakemake extension on VS code to run the scripts. Thanks a lot!!

    • @Riffomonas
      @Riffomonas  ปีที่แล้ว +1

      Thanks for watching! Which scripts? I didn’t have to install anything on VSCode. You sure you installed snakemake into the conda environment and loaded the environment?

    • @ricrocha821
      @ricrocha821 ปีที่แล้ว

      @@Riffomonas The Snakefile. Yes, I have installed using mamba, then restarted VSCode. I realized when I was coding, the script had a bunch of red lines showing that something was wrong with the codes. Then I went to the extensions and installed the snakemake one. After that, everything run smoothly. I really don't know what happened. :(

    • @etterathe
      @etterathe ปีที่แล้ว +1

      @@ricrocha821 Its probably because vscode doesn't recognize the syntax of snakemake file and highlighted it as wrong code. To run the snakemake you don't need extension but for proper highlighting you need one.

  • @etterathe
    @etterathe ปีที่แล้ว +1

    Do you use docker for reproducible research in R? When to choose snakemake and when docker to intialize functioning environment? Could both of them cooperate?

    • @Riffomonas
      @Riffomonas  ปีที่แล้ว

      They definitely could. I dont use docker or singularity but should learn it. Next project 😂

  • @patricior7300
    @patricior7300 ปีที่แล้ว +1

    Please, Could You explain in a video, how to show in vs Code, something like environment panel in RStudio? Tnx

    • @Riffomonas
      @Riffomonas  ปีที่แล้ว +3

      Sorry I never use the environment window in Rstudio 😂 if you want to know which variables are in your R session you can type ls() at the prompt. Thanks for watching Patricio!

  • @kimberleytruyen1519
    @kimberleytruyen1519 6 หลายเดือนก่อน

    Is it possible to install snakemake on window?

    • @Riffomonas
      @Riffomonas  4 หลายเดือนก่อน

      Yes! snakemake.readthedocs.io/en/stable/tutorial/setup.html#setup-on-windows