Submind YouTube summaries
Thumbnail for nf-core/bytesize: nf-core/drop

nf-core/bytesize: nf-core/drop

Watch on YouTube

Video summary

The nf-core/drop pipeline is a specialized bioinformatics tool designed for the detection of RNA outliers, serving as a critical resource for studying human genetics through both DNA variants and RNA quantification. By analyzing data from thousands of genes across various tissues such as blood, skin, and muscle, the pipeline helps researchers identify individuals with gene expression levels that deviate significantly from the norm within a cohort. This capability is essential for diagnosing rare genetic disorders like ALS or cystic fibrosis, as well as investigating complex conditions like cancer, where understanding whether specific genes are underexpressed or overexpressed can reveal crucial information about tumor suppressors and oncogenes driving disease progression. Originally developed seven years ago using Snakemake, the pipeline has evolved to address the challenges of processing large-scale data from hundreds of samples efficiently and reproducibly. A significant milestone in its development was the migration from Snakemake to Nextflow, a move driven by the need for better scalability, stricter guidelines on container usage, and improved maintainability. This transition involved converting approximately thirty-five custom modules and resolving complex differences between the two workflow managers, particularly regarding file caching and directory structures. The resulting Nextflow-based version offers enhanced reproducibility through standardized containers and is now being gradually deprecated in favor of this more robust architecture to support global research efforts involving thousands of samples. Running the pipeline requires specific inputs such as a sample sheet defining RNA IDs and grouping parameters, along with configuration files for genome assemblies and gene annotations. The workflow automates the entire process from raw sequencing data preparation to statistical testing and quality control, ultimately delivering interpretable results in tabular format for clinicians and geneticists. Its effectiveness has been demonstrated in major European multicenter studies involving over five hundred samples from thirty different centers, leading to diagnoses in twenty families with rare disorders. Furthermore, the tool has been successfully applied to large cancer datasets containing transcripts from thousands of leukemia patients, proving its versatility across diverse medical contexts while maintaining a user-friendly interface that simplifies the interpretation of complex genetic findings.
Read the full video transcript
Uh hi everyone Maxim here hosting byte size. So I'd like to welcome ata and vente from the technical university of Munich and Nicholas from the center of medical genetics in Gent so CMG and uh today they will present NF cord drop. So as usual you'll be able to unmute yourself in the end of the talk to ask your question but you can also ask them on Slack later. So now over to you and uh thanks again for this byte size. It's going to be exciting like I think it's the first time that I got like three person presenting a single pipeline. So looking forward to that. >> Uh great. Thanks a lot Maxim. So I I start sharing um the screen. So we'll all I'll all I'll give a short overview on what it is is about I start a bit with with the introduction then continues with the motivation and Nicholas explain us how it works and how to run it. Feel free to ask any questions at the end of each slide if that's easier for you. So talk about drop which stands for the detection of RNA outliers pipeline. I'll give an overview of also the the genetic part of it. So in genetics there there's different reasons why one can study genetics of a of a individual of a human and um one usually or can study the DNA from one side from the the the varants or the the mutations part for that we can sequence the DNA and and find these mutations and also sequence the RNA which provides complimentary information to it to the DNA. It allows to quantify each gene and with quantify we can now statistically model and assess and conclude and we can do this which it with each part of of the genome with each gene and just to give an overview all of us have around 20,000 genes that encode for a protein give or take but that's more or less the range and there's different applications so just to study traits like common ones such as age sex ancestry more interesting ones such as heights or BMI or for diseases which has lots of applications of cancer, schizophrenia or even rare disorders which maybe you have heard a bit less about but for example ALS which is the one that Stephen Hawking had or other a bit more famous ones are cystic fibrosis or hemophilia and with each of these require an independent assay. So a bit of how how this works like an individual goes for a genetic testing then a bio sample is taken usually blood is the easiest one in some cases can be skin or or muscle or another tissue but blood is by far the easiest then it goes to this so called sequencer which means that it's it gets the the sequence right the the the letters of the the ATC of the DNA or the RNA passes through this machine and at the end it generates a a file a simple text file Well, not so simple. Maybe in the gigabytes of information containing your genetic code and for from that file we can quantify I said each each gene that is working on uh on the tissue on each individual. Why do we do this? With this quantification, we can then merge from different individuals these uh these values and try to see if there's a gene in one individual that is working less or more than it should be. And this it should be we defined by the cohort itself. So we gather enough individuals um to be able to model each gene and these enough individuals would like at least 100. We can quantify model get the mean the standard deviation right like a like a normal distributions but it's it's a bit different the distributions we can quantify and test each gene and at the end we might find these outliers which then we go back to the uh to this gene in this patient and see what's going on and these outliers is what gives the all out of drop right we said the detection of outliers pipeline so all of these work to detect those and for that we we've developed in the past some statistical ical methods uh call out trader and tracer each are published very much well used and both are available as by conductor R packages so a bit idea was that we start with these counts with these vectors that I showed or this matrix and we run this software and we get the results right so it sounds relatively stra straightforward but in reality we have before this count we have raw data and you saw that it's not just one sample but we have hundreds samples and maybe uh this there can be more each day each week that a new patient comes the hospital has to rerun the the pipeline. So we need fast and we need reproducible results. So we really came from from this expectation or this problem that that was the reality and therefore we had to to design a workflow that is able to pre-process this data sample by sample group it together perform perform the statistical analysis and give the the results and we implemented this already seven years ago in the snakemate and more or less it took one day for a cohort of a few hundreds of samples. So a bit what what is the uh what is happening here? So so the input is these files that come from the sequencer the raw sequencing data consisting of gigabytes um of uh each each file. Of course we need a config file right that you need to with the parameters you you'll see more on on this what are the parameters of the pipeline. We need to create that and then uh we specify how we want the pipeline to be run. We need a sample annotation file. This is common to most uh workflows right you need to say these are the samples and these are the files uh quite simple uh we can do I I won't go into details but there's other specific files that are that are needed but this you download once and that's it after you have this input data that it can take a while to to prepare but once you have the gist it gets uh smoother and faster and easier then you can execute each of the modules so I won't go into detail why what each of these does, but each of them provides a bit complimentary information on top and allows you to analyze the the sample even better. And we design it in a way originally snakemake that after preparing the input data each of these three modules was executable with just one command. So you run snakemake a expression. Yeah, of course you give some uh memory cores and so on slur whatever other manager you have and in some [clears throat] couple of hours you get the the results and a bit what are these these outputs and the these results that it does. So the idea is that the the workflow takes care of absolutely everything from generating the counts so these vectors that I I showed you before to merge them into these matrices to do the statistical testing in between to actually check the quality is is it correct all these vectors do I have a sample that for some reason it didn't work the experiment didn't work right at the end we're doing a chemical or laboratory experiment uh so we test that did everything goes well both at the individual level and at the cohort level and we return the results in a table. I think it's a TSV files for the user to run uh to to interpret. So that that was a bit bit the the idea to to given some input run with one command, wait some hours and have everything done for you from the pre-process, the different steps, the quality, the results so that the clinician can just go through these results and interpret what does these genetic findings mean. So now I I give a bit of an example of a cohort that we were were involved. So we participate in a European multic-enter RNA seek analysis. This was oriented in in rare genetic disorders. So the these are as the name says they're rare. So in you can't just have one hospital together like you you you need to to combine many hospitals, many samples, many diseases because they're so rare that each hospital does not get get so many of the same type. So there was this consortium made called sulvard around Europe and we participated or around 30 European genetic centers participated altogether contributing more than 500 samples or 500 individuals from each a sample. This sample came as I say usually blood but we had four different tissues uh blood skin muscle and um another type of uh of blood centrifugate a bit differently. So you see it's a very heterogeneous a complex thing. The all the 500 samples we didn't have at once but they were sequence more or less in a 100 at a time batches of 100 um and drop uh was run there. was uh really one of the the the best scenarios I can imagine of drop to to be run and to show all the features. Um how smooth it is to add a new sample, how to do these groups, how to check the quality. Some samples were removed, how to do the statistical test and how to present the results to the geneticist. And this uh effort uh while running the pipeline doesn't take a lot of time. The interpretation takes the most. And that that's a bit idea, right? that the pipeline is as simple as possible and we dedicate our time to evaluate the results and help the patients in total in this effort we diagnose uh 20 families. So as I mentioned the cohort was conveniently processed using drop and now uh it's not just we running it it's the the paper was published 2021 so it's six seven years since the first studies running it so it has more than almost 200 citation it's been used worldwide for different diseases uh different centers different conditions and slowly we have uh updated I think we have maybe 10 15 releases so we are quite sure it it works it's quite robust of course there's always a new feature, a new bug, a new thing to be implemented. But basically, we we can say it works. At that, do you want to take it from now? Do you want to share screen or should I share screen? And you say next you're still muted. Still muted. Okay. Yeah, I just shared on my own, right? You can see my screen. Um so yeah as you sent us said we have dropped that and we saw that it works very nice in the context of rare disease but we also took it a bit further and applied it on the cancer settings specifically in blood cancer in this work and so this was a big work but here I just want to um showcase where drop was used where we had the transcripttoics from 3,700 uh patients um from multiple different leukemia subtypes and there we run a drop uh namely the aberant expression and apparent splicing modules and in the end this helps us um basically predict whether a whether a gene is um cancer driver gene or not. And one example that um we can see here is that we showed that after calling these outliers um so in rare disease it's pretty easy to say okay this was the um the the diagnosis the gene was problematic and that's the diagnosis. In cancer what we can look at is the tumor suppressor genes um and the ankco genes and the idea is that when the tumor suppressor genes is underexpressed the cancer has much chance to grow. So it's the problematic and we show that in our underexpression outliers we are enriched for these type of tumor suppressor genes and on the other hand in the overexpression outliers that we call with drop we are enriched for anko genes meaning that these are the genes that if they are overexpressed we are probably going to have cancer and problems in cancer. Um so basically this was our um basically the biggest working drop in numbers of samples and this u shows us some limitations and challenges in the pipeline. Um specifically we analyzed 3,700 samples and this has some scalability issues and [clears throat] it uh it's really hard to also uh do the resource management here and basically reproducibility is another main problem that um also goes hand inhand with the package version management that if there is a version uh change in the package we have to take care of is we have to know what exact version we run our algorithms on and also on the side of maintainability that um we were maintaining this GitHub package on snake pipeline and it was a bit tough so that's why we decided to move from the original pipeline into the next flow pipeline and basically kind of try to circumvent these challenges in the pipeline structure that we had and use Next flow um opportunities to make our package basically more uh scalable, reproducible and maintainable which um comes to this drop and Nicholas will take over from here. Yes. Can you go to the next slide? Yes. Yes. Okay. So, a little bit of an overview of the actual next porting part. Um we converted about 35 local modules which consisted of custom R scripts to Nexflow. Uh this was a bit challenging but I'll come back to that later on. Uh the pipeline also uses seven NF core modules may need to do some standard things like converting chrome files to bump files etc. Uh we also used eight separate flows five of which are local. Um these consist of the modules which were mentioned earlier like the abberent expression, aent splicing and the monalic expression. Um and over all these local modules we use 15 different sa containers um which should increase the reproducibility issues uh which should solve the reproducibility issues that they had in the snake pipeline for for example. Um then the main challenges of the doing the actual Nexto porting were mainly because of the differences between snakemake and nexto um and the way the custom R scripts actually interact with each other. Uh so in the drop snakemate pipeline they use a cache inside of the results directory to actually uh check and keep uh publishing files in there. Uh but that's of course does not work in Exo because of the whole work directory structures. So I had to come up with a little bit of a system to um output the directories, give them as inputs to the new to the next modules and reoutput the same directories back to the next module. And this was not extremely efficient, but we'll need a whole rewrite of the script structure and it's a whole lot different project to actually fix, but it works well enough for now, I think. So um I think it's a nice system. Uh so then converting some custom logic was also a challenge but I managed to um catch most of these this logic using Nexo plugins like NF schema for example and some uh functions I just ported from Python to Groovy from the snakemate pipeline. Uh then I think the main challenge um which the other guys will probably also uh have is to keep the snake make and the next pipeline in sync. Uh because there are a bit of differences in the implementation. It's going to be challenge to keep them in sync and I think the next pipeline is one or two verses behind right now. We should maybe update it sometime. Um so yeah migrating snake make logic to next I already said and then um to keep the pipen as efficient as snakem pipen uh we will need to still do some work on the scripts to make sure that everything is running as efficient as possible in the maxwell setting but I think the implementation as it is now is surely good enough u to have it running on an big scale. Okay. >> Okay. Yeah. Thank you. I will continue with um basically this question of now that we have an accord how do we run it and um we need two things two main things. One is the sample sheet where we have our samples that are specified here in a T separated file and the important things that we need here are the RNA ID which is our sample ID basically and the PAM file corresponding to this and um drop group. This is basically uh how we group our samples together. For example, in the case that I showed about the leukemia samples, we had 3,700 samples across 24 different groups and you can basically specify this in the sample sheet with a comma separated um yeah value in the drop group column and then in running you can specify which exact group you want your run to be on. And there are some important um parameters for the counting whether the BAF files are pair in and whether they are stranded or not which is important to specify and we need a config or the parameters. Basically these are the um the required ones are the input which is the path to the uh tsp sample sheet that we talked about the out which is where the um the output directory that the results would be saved and then the genome the version of genome assembly used and um basically we said that we have three different uh basically modules of the pipeline expression splicing and monal expression and Each one has its own parameter to whether it skip this or not. So if we set the aarent expression skip a skip to true it will skip that and it will not run this part of the module uh this part of the pipeline. And then for each of these modules we have uh the the groups where basically correspond to the groups that I talked about in the sample sheet. So in the AE groups we specify the groups that we want to run a branch expression on and also there is the gene annotation which we also talked about that um here we have we should provide it as a file basically key value file the name of the gene annotation for example uh here the version 29 and the G path to the GTF file and of course there is a uh the documentation is already on the NF core drop and parameter ters and you can see all the other parameters and explanation of how they um should be specified and what you should uh consider and which ones are basically required which one's an option and what's the default value. Um and here's a video example of what exactly you can run it. Next we'll run the pipeline and then code drop and then you specify the profile which right now we have as Nicholas said for Docker singularity and condom and sample sheets genome and G annotation. Um so with that we come to the end of the presentation. Thank everyone for attending the presentation. I also would like to thank um the penor lab here at technical university of tomb where me and the center are and from GHGA uh the workflow team uh where also yang uh in the beginning of the project took a lot of control of the project and pushed the project and also from the hand Nicholas and thank you and we are happy to take questions. Thank you very much. Uh let me allow people to unmute theirel. Okay. Uh people you should be able to unmute yourself now. If you have any question I don't see any question on the chat right now. So let me ask the first question. What was the like why did you wanted to change like from snake make to next flow to begin with? What was the first reason for that? >> Um so should I go ahead or >> yes go go ahead? Yeah, basically um the main reason for me or for us I guess is the um maintainability and reproducibility. Um specifically like after a number of samples also about the scalability um it's much easier in next flow to do everything in the same structure and in the correct guideline. it's much easier to say okay we should have this containers and we should run it with container whereas in snakemake it was much easier to just run it with cond of course it's possible also in snakem but here in next flow we have much stricter um guidelines and use cases and also it's much easier to ship um basically shipping next flow uh pipelines to for example cloud and other places other uh Yeah, universities is much easier than um shipping uh snake made pipelines. >> Uh did you gain collaborators by doing that? >> Um I think for example Nicholas had um people interested and one of the main reasons that we actually pushed this was um hit [laughter] wanted to wanting to run it on their side. So um and then I like we have released it recently. So hopefully we will get more soon. >> Exactly. Now now it's it's the time to promote it. Now we we were waiting for this uh opportunity this uh talk to now like let's say officially launch it. We need to double check some stuff and then I think it will become more and more popular. >> Uh Nicholas F has a question. Fran, go for it. >> Uh hello. Thank you all for the talk. Um really impressive work. I was just wondering about the European rare disease study. You said that uh you found the causal gene in 20 families and I was wondering to how many of the sequence individuals would that refer to because I assume there is more than one family member in the study. >> Um yeah thanks a lot for the question. So indeed there were like 500 samples but some individuals there was skin and blood and this uh other monuclear bloods as well and some muscle. So so and indeed some had the the patient some had the parents. So at the end uh this represented 8% of of the cohort was diagnosed. So it was I think uh I think it was just 300 unique families with at least one affected individual that were fully unresolved or genetically unresolved and out of those we got this 20. >> Okay, that sounds really nice actually. >> Yeah. Yeah, it was. And what was cool is of some individuals that we had the two tissues, we could see the defects on both tissues. >> So yeah, that was great. >> Yeah. And one uh less serious question, I really wonder how you managed to get this name for the NFO pipeline. Like this also mainly goes to Maxim like drop is not very self-explanatory if you just hear it right. [laughter] >> Yeah, if I remember well, we agreed to keep the name because there was an already existing pipeline and community. So very similar to what we did for Sarak. Well, Zaric is a very special case as we all know. >> So, similar to eager if you prefer, >> right, cool. Uh, that's my question. Thank you so much. Uh, great talk and great pipeline. >> Thanks. >> You agreed that was why we decided for that. >> Yeah, I mean as as I said it has now almost 200 citations that people know it by drop there. We have stickers like it's in they not in US in Australia in Hong Kong like renaming it would be would just be more confusing than useful. >> Yeah, I fully agree and that's that's the only reason where where we keep like a name that is not boring and nondescriptive. >> Now that I know about the stickers, I totally understand. [laughter] >> Yeah. Where can we get more stickers? >> Uh we we have them. Uh so we we are always in conferences and then we give them around. I think I have one ofer here but there's there's yeah we next time we meet >> happy to send you one by post as well. >> I know. Uh I have one question for Nicholas. Nicholas what was your biggest challenge in making like this port? uh mainly um understanding snakemake because I'm not really that first in snakem make. So uh that was a difficult part to really understand how the main uh workflow actually worked but once I got used to that and I knew the bit of custom logic that was implemented in it then it was quite all right to do the port. Um but yeah that was the biggest challenge for me. And so do you maintain the snake make in parallel as well or uh what what is the plan with that? >> So yeah I think the the idea is now to start deprecating it slowly because we still have users there. They're posting issues but yeah we we cannot right makes no sense to do two. It's too much work too much overhead. So you know the usual transition slowly one and the other one on top. No not just okay since tomorrow 26 of goes by and we close it. But we'll see how the users start doing it uh taking it then now the the new issues in in the core but gradually it will uh get deprecated and snake may one. >> Okay thank you. Uh do we have any other question from uh participant? I think we're I think we're good. Uh [snorts] no, thank you very much. I really uh that was very like interesting to see like how it goes and I really like the to see the dynamic and how that was like created and how you like made the migration and everything. So for me that was part that is interesting more because yeah I'm sorry like the biology behind that that's a bit out of my comfort zone but still very interesting to hear and you explained it like very well. So thank you so much. Uh yeah given that we don't have any more question I think we can call it a day. >> Yeah thanks a lot Francisco Nicolola Zata everybody present. Um it was a pleasure to give it and hope it gets uh it helps a lot making it more popular and visible and and and reach to everybody and keep on using it. Increase diagnostics. Yeah. >> Thank you. >> Thank you. You >> Bye.