 Hello everybody and welcome to this training on workflow reports. So today we'll talk about workflow reports which are a special kind of report you can define at the end of any workflow that summarizes the most important results. So before we get started let's make sure we have galaxy open, and we have a fresh history. So if you see some other history here click on the plus icon to start a new one and just give it a name you'll remember like workflow reports. Okay, second thing we need is the training manual. So all the steps I do today you can read in there as well, plus some additional information probably. So you can access the training materials always at the top bar of galaxy with this graduation cap icon. This opens the training materials website. And to find our tutorial for today we're going to scroll down to the galaxy tips and tricks section and click on the topic called using galaxy and managing your data. So there are a lot of short tutorials on here that really focus on using one feature of galaxy. So you see if there's things about uploading data histories managing your data if you have lots of data sets. And we're going to go scroll down to the workflows section and find workflow reports and then click on the computer icon to open the training materials. So, like I said workflow result reports allow you to summarize most important results of a workflow. So this is especially useful if you have very large workflows if, or if you are sharing them with people who are maybe not so familiar with either galaxy, or the tools that are used in the workflow. So instead of having to look through the galaxy history and find the interesting results and clicking on the icon for each of them to view the results. You can define a workflow report that takes the most important results and puts them in a single page single web page report. So in this tutorial we will show you how you can view such reports, how you can define them or change them, and how you can share them with others. So if you can do anything we will need a example workflow. So here we're just going to take a simple workflow which is the workflow use in the galaxy 101 for everyone tutorial. And we'll just use that as an example. So let's import that workflow first so if we scroll down to this first hands on box, you can copy the URL. You can go back to galaxy by clicking anywhere outside of the tutorial window and going to this workflow menu at the top. So this gives you a list of all your workflows so you may already have some workflows here or maybe empty it doesn't matter. Either way we're going to click on this import button at the top right. And then you have a menu with various options so we can either upload a file from our computer if we've downloaded the workflow previously, or you can just provide a URL like we have. So we'll paste in the URL there, and then hit this button import workflow, and then it will import it and bring you back to this list so you should see now at the top of the list. Galaxy 101 for everyone imported from your own. So this is our workflow. So the exact contents of this workflow is not really important right now that only important thing is that here. We have a data set with perform some data manipulation and some plotting on this data set. So we're going to make workflow report that shows these plots show some of these tables at the end of each workflow run. So first let's get a feel of this workflow a little bit so let's run it once without doing anything. And then we will create a report and see how that looks. So let's go back to the training material by clicking on this hat icon again. And if you scroll down now to the second hands on box. There's a link here as a note a link to an iris dot CSV file. So we're going to hit the copy button and import that. So on the left side of Galaxy have this upload data button. Click on that then choose paste fetch data at the bottom, paste in the URL and hit start. So this is a nice small file should be relatively quick. And we will just run this workflow once there's always a sort of default report that is made at the end. This is not customized yet of course because Galaxy doesn't know what your workflow is about but it'll give you some standard information like what the inputs were how long it took to run things like that. So we'll show you how to do that too. So when it's done uploading we just have a very quick look at this file. The details aren't important. But you'll see that it's a tabular file with some information about different flower species different iris species. So we have some information about the length and width of the pedals and the sepals for different species. Okay, so first up let's run this workflow that we have. So we're going to go back to this workflow at the top. You're going to at the top of the list should be the tutorial we or the workflow we update uploaded. And we're going to hit to run workflow here at the right this play button. And this tutorial only takes one input so we'll just give it the iris dot CSV file and run it. Okay, so I already selected the iris file. You can click on this expand full workflow form if you want to see which tools is going to to performance going to some format conversion, some day manipulation steps, cutting and grouping, and then to scatter plots are made. Okay, so just run hit run workflow. And we'll see the progress here, and then we'll just wait until everything is finished. So it shouldn't take too long. A couple minutes. I see already here, everything that will be created. So just wait a few minutes maybe grab a cup of coffee but shouldn't take more than two or three minutes. Okay, so once your workflow is finished, we can have a quick look at the output. And you can see here that it's made to scatter plots, so you can view them quickly so there's some nice plots about the data set. And click on the unique data sets. It shows a list of all the different unique species in the data set. And the group outputs give something similar they group it for species and then give the average value for some of these. So these are the points in the, in the data set. Okay, so these are the kinds of things tables and images we would like to include in our report. Now every workflow already has a very simple default report so first I will show you how to access this report and then we can work on adapting it to customizing it to what we want. So you get the workflow reports, you click on user here. And then you scroll down to workflow invocation so an invocation is a run of a work. So you click on this in here, every workflow you've run across different histories is listed here. You can find the one at the top that you just ran. If we click on that here you see a little bit more information. So you see here that it's completed so these bars should be green if it's done. And you see here view report. So if we click on this view report, these words, we will be taken to sort of the default report that galaxy has made for workflow. So here this is what a galaxy report looks like. So it gives some information about the title of the workflow that was run. And some information about when it was run and the unique ID. So it gives us the input data set so it gives the beginning. If we scroll down we can see here the input data set that was used. It shows already some outputs and information about the workflow. So this is already a very good start. But you'll notice that for example, the images are missing here. So we would want to edit this report to include the images and probably especially if we want to share this with other people who would like to add some text around all these boxes to say what the outputs mean. For example, what does this 50 here mean because it's not obvious. So things like this you can do you can add to the tutorials or sorry to the workflow report you can add text and sections and anything really that you want. So maybe we also want to hide things like the input data set because that's maybe less interesting than the results. So we can edit this. So to do that, we will go to workflow again. So these workflow reports are defined together with the workflow. So if you download the workflow definition file after you've made changes to the workflow report. So these live together so if you then share the workflow with other people you're also sharing the workflow report definition that you've made so they will get the same workflow report whenever they run this workflow. So, we will go to the workflow. So you may have seen that when we were looking at the report itself there was this little edit button but that's really to edit that one specific workflow report for that run. But what we want to do is change the definition so that every time this workflow runs, we get this updated workflow report at the end of it. So we are going to go to our workflow list again. This time we're going to click on the link. And we are going to go to the edit menu. So you may already be familiar with this workflow editor so here you can really see in this block diagram a little bit all the different steps that this workflow does so you can zoom out a little bit in this control here. So you really see here I was data set format conversion data mash scatter plot all the steps. Okay, so but that is all fine we just want to edit the report. So we go to the top right here. So you have all these icons and the third one here is the edit report. This is the definition of the report so this is something called markdown simple markup language to define text based outputs. So you see here this will be the title. And this is some. This is the default so that the inputs the outputs and the workflow that's the default report that you get for any workflow. And on the left here you see a lot of different components that you could add. So you can say, for example, job metrics, or maybe you want the galaxy version. So here and then I'll add this block for you that generates the galaxy version, and you can type in this so you can. Yeah, let's change this standard title so if we know this is going to be every time but irises we can say it iris report. Or if you know that your users may use this for different types of flowers you would say flower report so and this is really up to you. And it's often also nice to add some text so you can introduce a little bit the workflow and the components below so yeah just type anything here doesn't really matter at this point. But let's just play around with this and type here anything really. So below is the report about people and pedal. Flowers, for example, this can be anything of this just an example. So, let's also at the top here so wherever you put your cursor if you then click a component on the left to add, it'll be at a point so let's start off with the galaxy version which is always nice to remember. If you're looking back. Also if you have to write up before you paper and you have to give all these sort of data. So current times also an option so you see here as a generate time. Yeah so you can you can explore this a little bit and play around. So we could also say okay let's just remove the inputs. I don't think that's interesting. So here we have the workflow outputs, we would like to also add images, because we know those are missing. So we can click here on image. Okay, so here you see, you can select out labels, but we don't really see anything that looks like an image okay. So this is because we have not added labels to our workflow outputs yet. So anything you might want to use in a report you have to edit the workflow first to add a label and then appear in this list. So this is to make like if you have a workflow that gives hundreds of outputs you don't want that list that long so you would label sort of the most important outputs here. So we will go back and show you how to add labels before. So just for now, let's cancel that we can add any more text you want here so it's always nice and maybe say before you can make a subheading with two hash symbols, saying okay, or workflow stats or something. And with the galaxy version and galaxy time. Okay, so we made a few small changes. So we want to save this. So you can safely now return to workflow with sex. And when you're in this workflow menu again you can save save the workflow including the workflow report definition. Okay, so we can run this again just to see. How are changes affected the workflow report so we can, we can do that directly from this workflow edit menu as well so there's again this run workflow icon here so we can click on this run workflow. We are again going to give it the iris dot CSV file as input. So this time you will have to change it back again, and run workflow again. So again we will wait till that is finished and then look at the report. Okay, so once the second run of the workflows also finished you we can view the report again and see our changes. So if you didn't navigate away here like I that you may be able to access it from from the workflow status there but the way you can always get back to it is under user menu here at the top, workflow invocations. And it'll be the most recent one. And then we click on this to expand it. And we go to view report here again. And let's see. So you can see now in this report, the changes we made so we changed the title here. We added a bit of text and some workflow stats so this is the galaxy version and the time that this was run. It's been more clear if we added a little bit of text around these values to say this was run on galaxy version this. So we'll do that in our next edit. So again, we would like to edit this report to include the images from the workflow. Like I said first we will have to add workflow labels to make sure they show up in our list. So we'll go to the workflow menu again here at the top. We're going to select our workflow and go to the edit menu again editor. So we want to scatter plot tools. The outputs for those to be labeled so that we can use them more easily in our report. So we always zoom in and out a little bit if you need here and move the boxes if they're stacked on top of each other. So we have two scatter plot tools in this workflow. And if you click on one of the boxes on the right you'll see the settings for that. That run that tool. So here this one for us is the makes a plot with this title, a sepal length as function of sepal width, and the one below it for us. If we go. We scroll down we see this is the pedal length as function of the pedal with. Okay, but how do we add a label. So we're going to scroll down all the way to the bottom. And we're going to say configure output. So here you see there are two outputs. And at the top here you can say you can add a label. So these two outputs correspond to these two that you see in the box here so output one will be the PNG and output two will be anything else you made maybe PDF. So in our case with let's use the PNG output for our report so we're going to add a label to that so go to configure output output one and add here a label. So since we also want to distinguish between the two plots, let's make this label also reflect what is plotted so I choose to scroll up okay this was pedal length. So we're just going to call it pedal plots plots and maybe PNG. And you see that as I'm typing this, the value also changed in the box here. So you know that you've got the correct output of the two. So let's do the same for the other Gigi plots scatter plot output so again click on the box and the right scroll down till you see the configure output sections. We'll take one and label it this time is simple plot. Plot PNG output. Okay and again you saw that it changed here. So those are labels added so let's just save the workflow to be safe. And then we can also right away edit the workflow report again to include these two images now in the report so we go to this edit report button again next to the save icon. So you see here, our previous report definition. So in the workflow outputs, let's start with the plot so we can make a section here again, we can say, simple plot. People plot and let's try to insert now the image again to on the left or all the components you can insert into a report like this are going to click on image. So you see that this time our list is longer and now includes the two labels we just added. So we'll add a select here the simple plot output PNG output. And so here you see this was added, and this will show the plot and let's do the same for the pedal plot. Click on image here, select the pedal plot and continue. Okay, so now hopefully it should add these two components also to our report. So if there are any other changes you would like to make at this point so I mentioned it would have been nice maybe if we said as I have some introductory text here around the galaxy version. So we can say this workflow was run on galaxy version colon. And this work flow was run at. Okay, just so it makes a little bit more sense for people reading this, this workflow. So when you are happy with the way your workflow report looks again you can click the x year to return to workflow so any changes are still safe to have to make sure to hit the save button on this next window again save workflow. Okay, so we're going to run this workflow now one last time to show that the images are included. So again, let's run workflow. And again, let's change the input to our very first data set Iris at CSV, and hit run. So once this is done again. If you did not navigate away so you would see here also a link to the view the report. But if you did navigate while waiting navigate away from this page. You won't see this anymore and the way you can always get there is by the user menu and then workflow invocations. So let's click on view report here should now see all the last batch of changes we made. So you see that indeed now the text we added around here on the galaxy version and the runtime has been changed. And you see now that our plots are also there with the section headings. So great that's it so there are a lot more sort of different components you can add to this galaxy reports I encourage you to play around with these and if you have questions ask them in chat. And so the final thing I want to show you is how to share this report. So there are two different ways to share so if you want to share the configuration so that when people run the workflow themselves that they also get this report that shows the plots and this basic information and has this title then you just share the workflow in the way you're used to sharing a workflow so either you can download the workflow and send it via email or whatever. Or you can create a share link. So just as a reminder, if you go to the workflow menu again at the top, click on the workflow and click share. There are several options here so you can get a URL that you can send to people. So here would say make workflow accessible. If you want this publicly available so for instance if this is part of a published workflow for paper or you just want everybody on galaxy to see it you can also select this one. And this is a link you can share with people. Or if you want to just share it with maybe one or two other users on this with your collaborators on this server you can also give their email addresses here and they will be able to see it. So that is if you want to share the report definition, the workflow itself with the definition included. Now one other thing of course you could do is you want to share one specific report so with one specific run with one specific data set and you want to share those results. So there's a different way to do that. So we just need to go back to the report real quick so go to user workflow invocations. Click on the latest one here and go to view report. So if you want to share this specific report that was run today, 1128. You can go here to the top you see this edit button. So here you can, first of all you can make changes to this specific reports of in this case you would like to add some more. This doesn't affect at all the next time you run the workflow but it does affect this one reports so here we can say okay we had a little bit generic but in this case is the virus reports so we can change that if we want. And we can save it. And now it is saved as a galaxy page. This is, yeah, a way to share these reports and pages now let's look at this for a second if we click on here. So again you see your public URL so you can you can share this URL with other people and they'll be able to view this report. And then you see here okay this is here you see the change we made at that point that we shared our support. And everything so now you can share the link to this with anybody and they'll be able to see the workflow report for your specific run of the workflow with your specific data set. And if you want to find this back later so let's say you navigate it away from this like oh I had the galaxy page, where is that now. So, you can go to user and then pages. And then you will be taken back to this list of pages that you may have. Yeah you can add a manual pages to if you want. And again if you click on this drop down, you can say share or publish here as well. To again share with specific users if you want here with individual users by email, or I say make this page accessible so that people that have the link that anybody who has a link and do it. And if this is like something you really want to show off, you can make a page available in the published pages. If we do this. You see here the published pages and you can also get to the published pages page under here share data at the top pages so here you can see every page that other people on this galaxy server have shared made published on the server and then ours will be included there if you want, but by default it's just the hero. Okay so you see here this is the one we just shared and here are some published pages that other people have shared. So anybody on the server can see all these pages. And of course, if you want to stop sharing you can also do that. So I hope now you got a good first look at workflow reports. You've seen how to view these reports, how to customize them how to find them, and how to share them. So I hope you start using these these are very nice feature, especially if you're sharing your workflow with other people. And yeah, play around with it and feel free to ask us any questions in chat. Thank you for listening.