Hi, everybody. We're going to start up again after the break. So for the next 45 minutes or so, I'm going to tell you about a new topic, which is network analysis. And then we'll talk about enrichment map, which I'll tell you what that means. And then we're going to have another lab for another 45 minutes, where we get to use what we've talked about in this lecture. Okay, so this topic is about network visualization, and it's mainly here to introduce the next topic, which is a lot more relevant for the material that we learned this morning. And we also provided some reading material in advance, so that we could go over this more quickly. There's a lot of material online about learning network visualization and analysis, and also how to use site escape. So we chose in this class in this workshop to limit that and instead focus more on labs and things like that. But we're happy to answer a question. So it is going to be a little bit quick, but it will reference some of the reading material that hopefully everybody did. Okay, so in the beginning this morning, I talked about pathways and networks and how they're both representations of biological systems and pathways and processes in the cell. And network analysis, networks, the idea of networks is a little bit more general than that. We assigned this primer, how to visually interpret biological data using networks. And we wrote it a number of years ago. So hopefully everybody read that, that's kind of covers the basics of this topic. And so I'll just provide a little bit of context and additional information that will help us move to the next section. Okay, so networks represent relationships. And it's a general type of data structure, I guess. You can imagine the idea of relationships is very generic. You have relationships in lots of different fields and you want to understand how they work. People study these a lot in social networks, for instance, how people are connected. And in biology, we tend to use networks for looking at molecular interaction networks or genetic interaction networks related to the cell. But you could imagine them being cell cell interaction networks related to tissues or people also use them for food webs in ecology. So actually have multiple applications, even in biology. The ones that we'll talk about are more cell and gene oriented. And so they tend to, when we see them, they tend to represent relationships like physical relationships like a protein-protein interaction, a regulatory relationship like gene A regulates gene B genetic interaction, where you have like a epistatic relationship that you may have learned. If you if you don't do model organism genetics, you don't come across these two frequently. But the idea is that you like one mutation interacts with another mutation. So if you have a phenotype associated with mutation A, and a phenotype associated with mutation B, and then you mutate both, you have an organism that has two, that has a combination of both mutations. If the phenotype is unexpected, given what you know about the A and B phenotypes, then that's a genetic interaction. It means something more is going on than than just two independent types of mutations.  So actually all the three types that I mentioned are, you could say functional interactions. We're going to learn about this more tomorrow. But the idea of a functional interaction is that genes are related. If genes are related somehow functionally, you could draw a functional relationship between them, like they have similar sequence or they have similar domains or they have similar, they're part of the same pathway. All of those are examples of any kind of some kind of functional relationship. And that's useful for gene function prediction, which we'll talk about tomorrow. But you also might find it coming up in other contexts. So networks are useful for discovering relationships in large data sets. If you just had a few relationships, you could draw them out, you could just write them like A connects to B and B connects to C. You can understand that. But if you have thousands of these things, and you put them in a spreadsheet and look at them in tables, you can't really understand the global structure. So networks allow you to visualize the results and see global structure and how things are related to each other. And the other advantage of networks is they help visualize multiple different data types together. So for instance, we could view protein interaction networks and we can overlay gene expression data on the network and see if there are certain patterns that are common. And then finally, network analysis. And so these are mostly covered in that pre reading material. What's not covered too much is network analysis. So network analysis is an analysis method that uses networks. And there are lots of different types. Just to get across the basic concept, I'm just going to cover this idea of six degrees of separation. How many people have heard of this idea? Six degrees of separation. This is the idea that everyone in the world is connected to each other by six steps through a friendship network or acquaintance network. So this idea originated in the 60s. This social psychologist Stanley Milgram did an experiment where he asked people in Boston to send postcards to somebody in New York. They had to do it through friends because they didn't have the person's address. So and each time a postcard went to a friend, the friend was instructed to send a postcard back to the scientist so that he could keep track of where things were going. And quite a lot of the postcards actually made it to New York to these random people. And on average, it took six hops. So that's where this idea comes from. It's probably a lot closer now with Facebook. But it's an interesting example that people have heard about sometimes and sort of you can think about how it works. And the question, if you had a network mapped out like the Facebook network, if you wanted to know if you're connected to someone else and how, then there's that's a, you know, a simple question like how am I connected to this other person? And what is the path? So there's a computer science algorithm that is called shortest path by breadth first search. And it's from the field of graph theory. So in computer science, they don't call things networks, they call things graphs. We don't use, we use the term networks in biology because if you say graph, most people think plot, like X versus Y. So, but if you if you're interested in learning more about this topic, you search graph theory, and you'll find a lot of like 100 years of researching computer science in this topic or in math. So this field has come up with all sorts of interesting algorithms, and they've proven that they work. So in this case, we can just say, if we're interested in figuring out the path from A to B, and just go talk to a computer scientist, and they'll say, Oh, use this shortest path algorithm that's been developed decades ago. And it will tell you if there if two nodes are connected. And if so, we'll find the shortest path. And if they're not connected, it will say, I can't find the shortest path. And it's interestingly guaranteed to do that mathematically, proven it. So you could the advantage of understanding that analogy and mapping sort of the biological networks to graph theory is that there's a whole bunch of these algorithms that are available, and they're very powerful because they're many of them are proven to work in particular ways. And you could just go to that library and take them and say, I'm going to use this algorithm to answer this question. And so obviously, we could ask if two proteins are connected and and find out how they're connected. Is that biologically relevant? Maybe, maybe not. It depends on our network. Just because proteins are connected in a network by some path doesn't mean that path actually exists in the cell. The proteins have to be co-expressed, etc. So there's additional biological information that you need to think about. But it just illustrates the idea that you can use algorithms from computer science to solve problems and ideally biological problems. So people have spent, I guess, since around 1999, 2000, so almost 20 years, trying to figure out different ways that they can answer biological questions with computer, these computer science algorithms. And people have come up with all sorts of different interesting types of network analysis over this time. So, for instance, gene function prediction, which we'll talk about tomorrow, detection of protein complexes and other modular structures. This is useful if you have a network. I don't think many people here are generating networks as part of their data. But if you were mapping protein interactions, you would be interested in looking for modular structure that could represent protein complexes. This method is used in something we'll learn about tomorrow. And so it might be mentioned. You could study network evolution. You could predict new relationships. So given existing relationships, predict new ones. And that's useful for kind of completing the database. And then there's also more disease oriented, clinically relevant types of network analysis methods, like identification of networks that relate to disease. And this we'll also talk about tomorrow with the Reactome Fi Vis Set Escape app, where you can identify reasons of a network where the genes are highly connected and also mutated. If you're looking at cancer mutations, for instance. People have tried to use network information to help diagnosis. So not just, you know, you've probably heard of the idea of biomarkers. So this is a pattern in your data that's predictive of some outcome. Like, can I find a gene expression biomarker that predicts whether someone's going to respond to a drug or not? If you incorporate network information, sometimes you do better at those types of problems. For the same reasons I mentioned this morning about why pathways are useful. And then this is related to this mutation idea, you know, which parts of the network are mutated. So these are just some examples. And these slides sort of have some additional examples here that you can search. But in general, we're covering the major ones in this workshop. So we'll be talking about them. Okay, so that's a network.  So a network is, you could ask the same question, I guess, about the gene sets and even the detailed pathway diagrams that you might know from textbooks. The, these things are models of cellular processes and they don't capture everything that's going on the cell. In fact, we don't know most of the things that's going, that are going on the cell. But we know for sure that they're, they're missing out on dynamics. So they typically represent static processes. It's difficult to represent like a calcium wave on a neuron or some feedback loop with these systems. There are more detailed mathematical representations that can simulate processes. But people don't usually use them. Ideally, we would use them, they would be quite useful for predicting like what happens if I knock out a gene or something. The problem is, is that they, they need such detailed information about rate constants and things like that, that it's impractical to use them because we just don't have that information measured on most, most proteins. Networks also don't have a lot of detail. Usually, a gene is represented as a node or a circle. And we know that genes have structure and proteins have structure. So that's could be represented, but generally is not. And also context is missing. So for instance, it would be nice if I have, usually when I see a network in biology, it's the network for the cell, but it doesn't say it's a network for photoreceptors in the eye or cardiomyocytes. Those are probably different networks. They would be different networks and we can increasingly get information cell type networks, but most networks that we get are sort of union of all information across all, all stages of development and cell types. Okay, so that was a quick overview of just a couple of additional points for networks that just to summarize here. And a couple of additional points is are that when you see a network, you should understand right away what the nodes and edges mean. Sometimes they can mean different things. So a node could mean a protein in one case. In another case, it could mean a small molecule or a drug or something. And you don't want to mix those two things up. Relationships are even more important. Usually in biology, there's only a few types of nodes, but in there are many types of relationships. So physical protein interaction is very different than a genetic interaction that I mentioned, maybe a more relevant example would be a relationship that says that two genes are co expressed. That doesn't mean they physically interact. You know, physical interaction is a lot more of a strong statement than for function prediction, then genes happen to be co expressed. And because there's a lot of different methods available for the list of network analysis, and I guess, we're going to mention this a few times in this workshop. Earlier, Veronique was mentioning that you can go look at omics tools, and you know, there's certain websites that you can go and look to find tools. There are 100 tools available for network analysis that I'll mention in a second. And sometimes it can be overwhelming. So, you know, there's, you know, if you become an expert in the area, you can figure it all out. But if you most most people would be approaching this with a question like I have gene expression data, and I want to, I want to do this. And then you can search for a solution either by going on a mailing list. So I'll talk about side escape. Side escape has a good mailing list. You can email your question there, and you should get answered by within a week. And at most, and and so, you know, sometimes that's what you need to do is talk to people and communicate online in online forums. Okay, so the next topic is network visualization and analysis using side escape. So side escape is a freely available. And again, I'm going to go through this pretty quickly, because you guys installed it and went through it already.  So everybody's knows the main features. Side escape is a freely available network visualization and analysis tool, developed by a collaboration of a number of different people, including our lab is one of the labs, we have two full time software developers that work on developing side escape, and there's about 10 or 12 globally. And it provides basic functionality for visualizing networks, and then you can extend the functionality by downloading apps. So the basic functionality allows you to visualize and manipulate networks and query them and lay them out. And you can also do database searching. The app store is present. This is an old picture, but they're actually I think over 330 apps now. And if you go to the app store at apps.sideescape.org, you can rank them by their popularity, for instance. And so you can see the ones that people are using. Those are probably the ones that are most useful. And you can read about them. But there are many others. So you can search here for for things of interest and browse around the categories that are available. So they're side escapes dot the only network visualization tool, there are other free ones and some commercial ones. It's definitely the most popular and kind of one unique part about it. I guess is the apps. But also an active community of people and these numbers like are actually out of date. So there's I think it's like 16,000 downloads a month or something now and 5000 people run it a day started up a day in the world. So the advantage of that is that there are people on forums who have probably done something similar to you.  Here's a picture of a side escape meeting that we had a few years ago in Toronto and people spelled out side escape just for fun. Okay, so I'm going to move to the side escape demo. The main point of side escape is a useful free software tool for network visualization analysis. We're going to use it in the next lab and also tomorrow. Okay, so the latest version is side escape 3.6.1. And and I don't know if this computer still is recording when I do this. But okay, so what I did before starting here is make this bigger in a different way. So you can see the menus. So just to show how said escape works, I am I've loaded up some data. The data that I loaded up is a sample file that comes with side escape. So if you go to the side escape directory, so on this computer, set escape is is in applications, you don't have to follow along now but just you can just watch what I'm doing. There's a in applications here, I've got a set escape 3.6.1 folder and in sample data, there's some files here and one of them gal filter dot CYS is a file that I loaded up that has a bunch of information preloaded so it's useful for demos dot CYS is a side escape session file. If you've installed side escape in it, it's you selected to have your computer recognize those files and if you just double click those files inside escape load up.  So you'll see here that this network is sort of pre laid out and the nodes have different sizes and colors. The first thing I can do here is I can I can move this network around I can click on a node and I can move it around.  And most of the time when you load up data, it might not be laid out very well. So the first thing you'll probably do is layout your network. So in the layout menu, there's lots of different types of now of layouts. So if I just do a grid layout, it's not going to look very good. Everything is just organized in a grid. It's a big mess. This might happen if you load up a network that you've downloaded from somewhere and it doesn't have a layout associated with it. So I'm going to apply this prefuse layout and that's one of the default layouts and and it lays it out very nicely. And I think that the reading material that we talked about talks about those layout algorithms, but I can answer questions about it. One of the common questions is what you know, how does it figure out the length of the of the connection? In this case, most layout algorithms just choose to lay out the nodes such that they don't overlap. And that they try to reduce the crossings in the number of crossings that the edges have. And that clears things up and it makes it easy to sort of see the structure. And the length of the edges is just determined to optimize those do other things. So they don't have any meaning. Some of the layout algorithms, they do try if you had some weight like a confidence value associated with your interactions, they could consider it and pull things together closer if they're if they are more stronger strongly connected. I forgot to download the Y files app here, which has some nice layouts. If you haven't done that, I recommend doing it. Let's see if I can just quickly do it now. So this Y files is Y F I L Yes. So I'm going to install that and hopefully this works. Okay, so now that I've installed that now under under layout, I now have a bunch of additional options. So one that I like is Y files organic. So it, it works pretty similarly to the other one. And but it's it's nice. And there's some additional layouts there. One of the things you notice, you might notice if you set escape is that when you're using this is that the labels are disappearing here. The reason that is is that set escape tries to speed drawing of networks up. And it can do that by getting rid of the labels. Because if you have a big network with lots of labels, it slows down a little bit to draw all of them. And if it zoomed out too far, such that you couldn't even see the labels, even if they were there, it just it just hides them. So if you want to see everything, you can go to view and you can click show graphics details here. And then everything will always be there. And it won't it won't do any of that hiding. So it's it's there. But you can see as you get smaller and smaller, you can't really meet them. So but sometimes it's useful for that effect is disconcerting. Okay, so what you should do with layouts, if you're if you're interested in learning about them, is just trying a bunch of them out. So you can often undo a layout if it's not to your liking.  Like, here is a hierarchical layout. If I had a tree, this would be a better like a tree network would be better to layout with this type of network. And let me try a circular layout. So this organizes everything in the circle. Sometimes that's useful. And if you have an attribute, you can order things in the circles, like most expressed least expressed. Okay, so I'm just going to quickly go back to this one. Yeah, so summary, I recommend trying out a bunch of different layouts just to learn what types of layouts there are. And then you'll know another thing. Sorry, I'm zooming in and out with the zoom to finger zoom on the Mac. You can you can use these buttons up here to zoom in and out as well. Usually different computers will have different shortcuts for how to zoom. If you have a mouse, it's the scroll wheel. If you have a trackpad, frequently, it's two finger. Well, it's, it's, it's a scroll wheel. So it's how you scroll windows, like the finder, the finder or Windows Explorer. However, you scroll that up and down, it's the same for for this. And yeah, we have not set it such that the kind of pinch to zoom thing doesn't doesn't work on this. So it's scrolling. Okay, so a couple of other things I want to show you. One of the things that happen sometimes with networks is that they get too complicated. And so it's nice to be able to make a smaller network. So one of the things that you can do is, we'll find something here. If I type in MCM one, it highlights this, this node in the middle. So that allows me to find something quickly. I can also filter this network by some, some value that happens, there happens to be a bunch of values loaded in the sample file. So I can filter these in this case, I'm getting all the most highly connected nodes. And the slider bar here that I'm moving is changing that automatically. And if I, if I'm able to find some subset of the network, like say I, I zoomed in and I wanted to just look at these, these nodes here. And I can go to file new network from selected nodes, all edges, and it would make another network that's just those guys. And if I want to lay that out, it would look slightly different. And now if I go back to the network panel up here, now I have two networks, I have my original network, and this little child network, which is the smaller set. And this tells me how many nodes and edges there are these numbers here. And this, this is a collection of networks. If I have lots of these, I can collapse them. And this says it has two, there's two networks in this collection. The color of the nodes, that's what I'm going to go to next. So the good question. So the other thing you can do is load up information and the tutorials kind of tell you more about how to do this. But if I click on one of these nodes here, and I look at the bottom here, I can see that there's a bunch of information on this about these nodes, like names, and some other variables, including some gene expression data at the end here. If I click this little, this little show columns, it will tell me all the columns that there are, and I can turn them on and off. And by default, most of them are on. And so, and you can do the same thing with edges. If I select an edge here, I have to click on the edge table at the bottom here. So nodes, node attributes and edge attributes. So here are some edge attributes, here are some node attributes. If I select a bunch of nodes, then it will just show me those, those nodes here, select just two. So here, it just shows me two here at the bottom. So I can take these numbers and map them to visual properties with a style panel. Again, there's tutorials on this. But for instance, I might want to some of these are already set in this sample file. So the fill color is set to map some gene expression data. So I'm going to get it to map something else. Another type of gene expression data that's here. Oops. Okay, so I switched to another type of gene expression data. If I click on this, I can sort of change lots of options here, I can change the color to red. And now this is now mapping from blue to red. So this this little panel here is sort of a very powerful visualization system that can take data that you have in this case, the data is some expression values that range from minus 2.426 to positive 2.05. And there's a zero line is white. So you can set these things up and you can visualize your data. So the other thing that's visualized here is the the size. So the size is the degree, which is the number of connections. So the more connections a node has, the bigger it is in this network. I can change that so that I'm going to change this to be smaller. And now those bigger ones got smaller. So anyway, okay, the yellow is I think, if I look at the fill color, the yellow is stuff that's out of range.  This one's yellow because I was like I had selected it. So it can be confusing. Any other questions about side escape quickly? Okay, so going back to the presentation. This presentation has some additional slides that are just sort of backups, and talk about the concepts that I mentioned. And the they also have, there's also some information about at the end here about different apps that are available. And there's one that does enrichment analysis, but we don't use it that much anymore, because the current pipeline that we have is better. This find active subnetworks is similar to something that's we're going to teach tomorrow. This is a way of clustering your your network data. And there's some a text mining app, although it's, it's actually one of the more popular apps, you can try it out. You can type in, you can do PubMed searches, and it will try and get a network result. And this was talking to someone earlier about text mining. This is an example kind of older. So it's not very up to date. And then these these slides just kind of go through some additional apps that you can look at if you're interested. And then also, there's some tips and tricks, which I covered some of them. But it gives you a little bit of extra information. So I'm not going to go through these, but they're in your slides for reference, basically, if you become an active site escape user. Okay, so I'm now going to move to another topic, which is in my short maps. Okay, so this is going to be more sort of get more interesting, because it's it's covering it's sort of tying things together from from today. So hopefully I can finish this in in about 15 minutes or so. But the so so this follows on from what we learned about this morning and up to the GSE and G profiler lab, that enrichment analysis is extremely useful. And frequently you get these big long lists of pathways. So it's great, you know, thousands of papers, as I mentioned this morning, almost every genomics paper does something like this type of analysis. But one of the problems that we have here is that there's a lot of similar pathways that that are spread out all over this list. And so if you want to if you get a lot of pathways, sometimes it's, it's hard to sort of quickly see the major themes. So for instance, there's a bunch of pathways like adaptive immune response and regulation of inflammatory process and my myeloid lymphocyte mediated immunity. So if you know a lot about biology, you can realize that those are all related to immune response and inflammation. But otherwise, you'd have to kind of search all over the place. So a number of years ago, we developed a method of visualization visualizing these results called enrichment map. So basically, it takes the data like this, and it shows it to you as a network. So now you know why I introduced site escape just now because we actually use site escape network visualization technology to visualize these results. So so the idea is that you have a bunch of gene sets like pathways, and each pathway gets visualized as a as a node. And the size of the node is proportional to the number of genes in the set. And the color of the node is proportional to the enrichment map score, like the enrichment score, sorry, enrichment, enrichment score, like the normalized enrichment score or any other score that you can get from enrichment pathway enrichment analysis tools. And then the gene sets are connected, if they if they share genes, if there's genes that are shared between the gene sets. So frequently, you'll have gene sets or pathways that come from different databases, but they're basically the same like five databases will have the wind pathway. And so enrichment map will identify that they all have that they have a lot of genes in common. And then when you run a layout in site escape, it will group all of the things that are similar based on the edges that connect them, the the lines, the green lines, the thickness of the green lines proportional to the number of genes that are shared. Okay, so so we can take the GSE example that we learned about and GSE gives us a bunch of pathways that are enriched in condition A versus B, and also condition B versus a so frequently we think about this as upregulated and downregulated. It doesn't matter, it doesn't mean that the pathways actually activated it. It means that the pathways enriched in the upregulated genes, which could be negative regulators of the pathway. So just keep that in mind. And then for GSE, we can take the significance, and we can we can color the nodes. But this time, because we have up and down, we can color them two different colors, red and blue here. And the overlap between these is computed as there's a couple different ways of doing it, but it's basically a set overlap statistic. Okay, so I'll show you some examples of this in use so you can see how it works. So this is some data that we analyzed. Data was published in 2007. And we found it in the database and used it in the enrichment map paper. It's a simple analysis. We chose it because it's a simple analysis and it was pretty clean because you used cell lines. And those are typically more less variable, have less variation patient samples, for instance. So in this experiment, breast cancer cells were treated with estrogen or not. And they were looking at how this response changed over time. So let's just focus on one time point after a day of treatment, 24 hours. So they did three biological replicates of treated versus untreated, do all the standard processing, get your differentially expressed genes, run it through GSE as we learned this morning, get your results and then you can load it in an enrichment map, and you'll get something that looks like this. It doesn't look exactly like this. This is a publication version of it, but we'll get to that in a second. You can see immediately that there are major themes that pop out translation, protein sorting, RNA transport that are going up, and these ones are going down. So this visualization allows you to at a glance sort of quickly see what major themes are going up and down. And if you zoom in on one of these, you can see we're zooming in on this one, you can see these these nodes have different pathway names, microtubule organizing center, centrosome, and these are all related as a sort of set of skeleton theme. Okay, so that's fairly simple idea. It's not that complicated. It's really just a visualization method. It's meant to just help you interpret the results of something like GSEA. You don't have to use this method. GSEA provides nice reports. And if you're happy with that, you can use that. You usually don't need this method. If you only have a few pathways that come through this method, it tends to be more useful if you have dozens or hundreds of pathways, and then it's it's useful to identify these themes in an automated way. The other thing with this that is not easy to do with standard enrichment analysis is due comparisons of multiple conditions. So here we have two time points, 12 hours and 24 hours. And we have new features in EnrichmentF now that make this better. I should have updated these slides to show the pie charts and things we can do now. Just to illustrate what we did here was we did the same type of enrichment analysis at 12 hours and 24 hours. And we mapped the enrichment results, the enrichment statistics from the early time point to the middle of the nodes and the late time point to the border of the nodes. And then you can see that a lot of a lot of pathways are enriched in the up, you know, the upregulated genes of both time points. But some of them like these ones here, for instance, ubiquit independent protein degradation are not enriched at the early time point and very enriched at the late time point. So that's something that's different between the two time points. Here's another example of something that's different. It's part of DNA metabolism. And, you know, so again, at a glance, you can see, answer the question what's different between the pathways that are enriched at the early versus the late time point. And now in EnrichmentMap, you can do, we used to have a limit of just two, but now you can do more than two.  And so here you can see that the protein degradation theme, one of these pathways on the y-axis is all the genes. They're not labeled here, but they are in the app. And then across the x-axis are the different samples, and these are labeled here. So these are the early samples and the late samples. You don't get a visual, this was a manually created visualization, but there is a way of knowing what the samples are. So you can see that at the early time point, there's not much difference between the treated and untreated. They're both, all the genes are up in both cases. But at the late time point, all of a sudden, treated, these genes go down. And so that's what causes this to get a strong signal. And so you can start seeing how you can use this tool to, once you find a pathway of interest, to start zooming in and explain the data a little bit more. So now we know that estrogen treatment at late time point lowers these genes and is actually not lowering all the genes on this pathway, but there's a big signal of these ones going down and these ones staying up in the untreated. There's more that you can do with this tool. One other type of analysis is sort of the last major type of analysis is something we called Queer Reset Analysis, the type of Post Analysis. So once you've created an enrichment map based on your PSCA results, or G Profiler results, you can add in additional gene sets.  So this little triangle here represents a gene set and you can, it automatically draws lines between all the other gene sets that have some of those genes in common. And so in this analysis, this was a mouse gene expression experiment that we found in the literature that had knocked out a microRNA. So if you knock out a microRNA, you expect certain pathways might go up because the negative regulator is removed. So a lot of pathways go up and a couple pathways go down. And then we took the known targets of those, or the predicted targets of that microRNA and represented that as a set here, this little triangle. And then you can see that there's a bunch of pathways, especially in the up pathways that have a lot of targets of that microRNA. So this might indicate that maybe this microRNA is regulating these pathways directly. This pathway doesn't have any microRNA targets. So maybe it's an indirect upregulation of this pathway. And the downregulated pathways don't have any targets, which is what we expect. Another example of this is using doing the same thing with transcription factors. So in this analysis we did, this was a leukemia project. And we did a, we had transcriptomics data. We made an enrichment map. We did an enrichment analysis and an enrichment map.  We also did some analysis of transcription factors that could explain the analysis, the transcriptomics data. And this is using a tool called opossum. We're not covering this on day three. I think we use iRegulon, which can help you in similar ways. But the top transcription factor that was predicted to be important is HIF-1-alpha here. And so again, we found HIF-1-alpha targets that are predicted or known. And we represented that as a little triangle. And then we added it in an enrichment map, put it as a triangle. And then this shows all the pathways that those targets are part of. So again, it's not all the pathways. So it gives you a little bit more specific information about what might be happening in the sample. So we might think, HIF-1-alpha, if it's an important transcription factor, it's regulating these three major pathway themes as the major thing that it would do. That's our hypothesis. And that's what was used to develop this autism spectrum disorder visualization that I mentioned in the morning this morning. That was done with just genontology and a few pathway databases and actually domains, just to give you a little bit of additional information. Enrichment map is a software tool that's an app for set escape. So when you load it up, you can, you can, you know, this is the, we have a slightly, we have an updated version now that looks slightly different, different. It's much easier to use. But you got the picture that you can do the things that I mentioned in here. And the way we use this is we start by visualizing all the pathways, and that gives us an overview of the whole, all the genomics data that we've, that we've applied in risk management analysis to. And then we identify interesting pathways and you can zoom in on those. One of the things you could do, you could do is if you pick out a specific pathway, you can take the gene expression data and map it to a network diagram of protein interactions or a pathway diagram and overlay the gene expression data on that, that diagram. The tool we recommend using for that is Path Visible. We can also use Site Escape. We haven't built that into the workflow in a very streamlined way. So something that we're still working on. But it's something that you can do. And it's sort of one way of drilling down to eventually get to the level of genes or proteins and protein expression or gene expression visualized on those genes and some to look for patterns. We also have word cloud and I should have included a slide call for auto annotate. There are two additional apps, Site Escape apps that help visualize in risk map. So in risk map, what you get is a network like this, and you can browse around it inside Escape. These networks have nice bubbles around them with names. We used to have to do that manually, but now we have a tool called auto annotate. So it's an app that you can download that that automatically draws bubbles around these themes and gives them names using a sort of the most frequent words.  Ruth developed in risk map the first version of it. And so she wrote all the software for for that. And when she was presenting a lab meeting, she made a risk map cookie, which was awesome. So I'm not embarrassing her. Usually she's not here when I present this. But anyway, so it was it was it was good because we realized that in risk maps were useful and also delicious. OK, so that was just a joke. So that is it for this presentation. The lab is now on. And what we want to do in the lab is try to run in risk map. And so for that, you'll have to very because is going to are you going to say anything about introducing what the lab is. Where where is it on this? OK, I didn't set that up here. But three. OK, so in module three here the lab practical part one, right? OK, so so this creates a new map from GSA. And part two does the same thing for G profiler. OK, so OK, so for this for this lab, you'll have to run site escape. Hopefully it works on everybody's computers and and then you can follow the lab and we have about 40 minutes for 40, 45 minutes. Say 40 minutes is that that's gets us to five. And so hopefully we can get through most of the lab quickly.


Good morning for day 5 and today is the big day, we are going to study the second law of thermodynamics. Now today's topic is second law. This is perhaps one of the most celebrated to some extent controversial law of thermodynamics and perhaps the most celebrated law among any law of physics. There are many reasons for this. One of the reasons is that there has always been confusion as to whether this is an exact law or an approximate law. Particularly, people who study the classical thermodynamics and dabble somewhat in microscopic or statistical thermodynamics where everything is about averages. They say any law including the second law will be valid on an average, but not exactly in each and every instant. Some people say that the molecular thermodynamics or statistical thermodynamics can derive the second law of thermodynamics. That also is not true. There are also premises involved which are equivalent to the second law of thermodynamics. You can derive second law of thermodynamics, but then you have to replace what we consider as a premise, the second law by some other premise. Many physicists and mathematically oriented physicists do not like the second law of thermodynamics because it is an inequality. The inequality in the second law as we derive it makes many people uncomfortable. They say this is not a complete law of physics yet and I fail to understand why they should insist that each and every law must be an equality. We will look at the second law of thermodynamics from the classical perspective. What we are going to do is we will study the background. For that, we will look at quickly revisit the first law and the zeroth law. We will see what they can do and what are their restrictions. What is it that they tell us and what is it that they do not tell us? In particular, when it comes to zeroth law, we will be looking at the status of temperature and then we will look at the need for an additional premise or an additional law. Then we will develop the second law of thermodynamics and just the way there were various ways of looking at the first law of thermodynamics, there are various ways at looking at the second law of thermodynamics. Many people have proposed a statement of the second law of thermodynamics. Each one in a slightly different way. At a gross level, they are equivalent but there are out of these. There are two methods which are considered reasonably robust. One method is that of Karate Odori whose formulation of the first law we have used. Unfortunately, his formulation of the second law is too mathematically rigorous and complex for us to appreciate, for us engineers to appreciate. But perhaps that happens to be, except for the formulation of Giles, the neatest formulation of the second law of thermodynamics. We will be using a formulation due to Kelvin, Kelvin's or Kelvin Planck's formulation. The reason for that it is robust enough for our purpose and it talks about engines and heat transfer and conversion of heat into work, cyclic processes with which we engineers, particularly mechanical engineers, we find ourselves on home ground. So, we will be using Kelvin's formulation. Then we will have a large number of definitions and we will derive many, many things. But we will do, we will note that the second law will help us do the following. First, it will provide us a basis for temperature, a thermodynamic basis for temperature. So, instead of an ideal gas scale of temperature or a Celsius scale of temperature, we will see how we can define a thermodynamic scale of temperature. Remember, Celsius temperature scale depends on a system, the mercury in glass thermometer. So, to some extent it depends on the properties of mercury and may be to a very small extent on the properties of glass. The ideal gas Kelvin scale of temperature or any ideal gas scale of temperature depends on the existence of a substance called an ideal gas. Why should that be so? If temperature and a scale of temperature is something basic in thermodynamics, then thermodynamics itself should come up and say this is the way one should define temperature and that definition should be independent of the properties of any substance, not of mercury, not of glass, not of two different metals which expand at different rates as temperature changes nor of any gas real or ideal. The second thing is will help us decide what is possible and what is not possible. It will help us put limits on processes, then it will help us derive relations between properties. For example, yesterday when we drew the T s diagram of sorry P v diagram of P t diagram, the phase diagram of water, we drew the line I will just show it here. Let us start from the triple point. Liquid vapor line goes to the north east, the solid vapor line goes to the south west. Then I said that the solid vapor solid liquid lines bends slightly towards the west, it is not vertical, it is not tilted towards the right, it is slightly tilted towards the left. So, for water it is something like this if I show it as a exaggeration. For many other fluids, it tilts to the right. It is not very obvious to us, but the property relations which we derive will tell us that for water it tilts to the left because ice floats on water. You try to tell this to a schoolboy, schoolboy realizes the two things, but it is unable to link the two up. That link is something which we will derive. If the solid phase has a lower density, then this line will tilt to the left. If the solid phase has a higher density, then this line will tilt to the right. Then for example, for an ideal gas the equation of state is p v equals r t that is Boyle's law. Then Joule hunted out another characteristic that the internal energy of an ideal gas is a function only of temperature. The property relations derived using the second law will tell us that if the equation of state is of the type p v equals r t, then its thermodynamically consistent and proper that u be depend only on temperature. So, thermodynamics by itself will give us such sometimes funny and unexpected relations between properties. Thermodynamics will not dictate what the properties are. It will not say that look your saturation pressure at this temperature should be like this, but it will say that look if your saturation pressure varies with temperature in this form. Some other property should vary with some third property in this form. So, such relations or restrictions it will put on various property relations. Now, let us look at what we may call limitations of first law and zeroth law. The first law talks about interactions. It also defines delta e and the final relation which we say is delta e is q minus w. So, long as this equation is satisfied, first law is satisfied. We multiply a process in which first law is satisfied, not multiply. Take a process in which first law is satisfied and change the signs of everything. Change the sign of q, change the sign of w and change the sign of delta e. The first law still remains satisfied, but quite often we know that one of these two processes only is possible. For example, you take a system containing a liquid, put a stirrer and stir it. If it is insulated adiabatic, then naturally the energy of the liquid will go up, its temperature will rise. We know this, but suppose I cool it. If I take stirrer work and let me show this with proper direction and q and I am maintaining delta e is 0. I am maintaining the temperature of water. We know that stirrer doing work on the system w less than 0, heat being lost to the surroundings q less than 0 and delta e equal to 0 is a possible process. We have seen this happen, but now we say that look we propose that in such a situation, the system is absorbing heat from the surroundings and it is stirring the stirrer and doing work on whatever is the system which was earlier stirring the or moving the stirrer. We know that this never happens or both satisfy the first law. First law does not say that this is possible, this is impossible, but we know from our experience that this never happens, this is not possible. Similarly, the fact that there are limits on processes, take say one metal block at say 80 degrees C, put it in contact with another metal block at say 20 degrees C. If they are of the same metal and have the same mass and if you keep them insulated from the rest of the world, then we know that the final temperature will be 50 degrees C for either block if you wait long enough and we will say there is a transfer of heat from one block to the other. So, temperature of one reduces, temperature of the other increases, but we know that if we keep the two blocks at 50 degrees C next to each other in an adiabatic system and wait long enough, the reverse is never going to happen. So, there is a direction of processes and not only that we also know that if we start with 80, 20 the process is going to stop when the temperature resets 50 degrees C for either. This 80 degrees C going to 40 degrees C and this 20 degrees C going to say 60 degrees C, this is not going to happen, but this is from the first law point of view. We need another law to tell us and to generalize the fact that this is not okay. We can give enough examples like this of the limitations of first law. Now, come to zeroth law. Zeroth law helps us define a useful thermodynamic property called temperature. So, the zeroth law, the first part of zeroth law, the existence of isothermal states finally, leads us to the idea that there is a useful property called temperature, but zeroth law stops there. It does not even tell us how to measure temperature properly. So, we created the science of thermometer, but there is no thermodynamic basis measurement of T. That means, no thermodynamic basis for any scale of temperature that we have come across so far or we have defined so far. That is one thing. Second thing is it does not tell us, does not help us define which is higher temperature and which is a lower temperature. It only tells us that T 1 is not equal to T 2. If there is a thermal interaction between two systems, zeroth law helps us say that the two temperatures are different because the heat interaction is taking place across a diathemic boundary. If heat interaction does not take place and zeroth law through the existence part asserts that if you take two systems A and B, you can always find out states of the two, at least one state of A and at least one state of B in such a way that say A 1 and B 1. So, that even if you allow them to interact across a diathemic partition, they will not interact simply enough, but that means the way we have defined temperature, the two temperatures are different, but which is higher and which is lower zeroth law does not tell us. Not only that, it does not say anything about the direction of heat transfer. Zeroth law only says that if you have a system A and if you have a system B and they are not isotherm, they are normal that means they interact with each other across a diathemic wall. Then the way we have defined temperature all that we can say is T A is not equal to T B, but we cannot say whether the heat transfer will be from A to B or from B to A. So, direction of Q not decided by zeroth. So, that is the status of temperature which has come out of zeroth law that it is a useful property, it is the same for it should have the same value for all states of a system or all states of all systems which do not interact with each other across a diathemic wall, but you ask zeroth law A which is higher temperature and which is lower temperature zeroth law says no, I do not know do not ask me which is higher and lower. And then you ask the guardian of zeroth law to tell us there are two systems which are a non isothermal the guardian will say yes. So, if you allow them to interact across a diathemic wall there will be a heat interaction, but if you ask in which direction will the heat interaction take place zeroth law guardian says no I do not know do not ask me zeroth law knows nothing about it. And that is the reason why we need a second law and that is why people started looking at it from the physics point of view. If you look at the history as I have already said the germination of the idea that there is some limit some restriction in nature on the behavior of things came from Karnaugh at least that is what we think may be there were the earlier philosophers whose work is not published or not recorded, but the known earliest ideas came from Karnaugh. He was a mine engineer and looked at and studied the behavior of steam engines that was his job manage steam engines which pump out steam from mines and move material in the mine power plants burning some wood coal any junk thing which came across. And naturally he got an idea of what is the efficiency of such an engine he related efficiency to the amount of work done which he could measure so much ton of ore to be brought up the mine shaft. So, raise of a weight that was the work done and to run the steam engine the amount of fuel burned you would have noticed that some engines burn less fuel for the same amount of work some engines burn more fuel for the amount of work done. And naturally for the fuel burn may not be Karnaugh, but the owner of the mine will have to shell out some money. So, naturally everybody is interested in doing the same amount of work, but burning the lesser and lesser amount of fuel so improving efficiency. So, Karnaugh started thinking about the ways of improving efficiency I do not know what the tricks he used to improve efficiency, but he started thinking as to why is it that efficiency cannot be improved. And if I improve the efficiency will I be able to I do not think it thought about 100 percent efficiency he said what would be the absolute limit of efficiency. If you look at that time the steam engines were even now reciprocating steam engines are not super efficient they have a poor efficiency at that time they had even poorer efficiency, because engineering and technology had not developed to the extent it has developed today. But the greatness of Karnaugh was that he had the ability of flights of fancy which came up with an idea which today we say we celebrate it as the Karnaugh theorem. We will prove it later today or I will tell you how to prove it you are senior students or teachers of thermodynamics. So, small small parts I will leave it to you as homework. It is statement today we know as the Karnaugh theorem at that time it was not a formalized theorem we will formalize it today by defining all the terms which will come up in this theorems. The Karnaugh theorem said that what Karnaugh said was that if you use the symbol efficiency of an engine he said that the efficiency of an engine can be maximized provided you do everything reversibly. The great contribution of Karnaugh is the idea of reversibility. We imagine that if you could have no pressure drop he could have no friction and he could have no temperature difference not unnecessarily heat the boiler vessel to produce steam. Then things would be reversible and he says then I will get the maximum efficiency of out of my engine. And he says so long as I cannot make it reversible the efficiency of my engine will be less than that of my reversible engine later on we added the equate. So, his idea that efficiency of an any engine can be can never exceed that of a reversible engine working under similar condition is today Karnaugh's theorem, but historically that is the first time anything pertaining to the second law of thermodynamics was thought about and quantified in a mathematical sense. Today we realize that Karnaugh's theorem we cannot accept Karnaugh's theorem easily as the basic statement of the second law of thermodynamics because efficiency of an engine reversibility many things have to be defined. So, after Karnaugh there were many people who looked at the second law and proposed statements formal statements of second law one was Clausius. The Clausius statement of second law goes something like this Clausius looked at refrigerators he said look let us have two systems one at T 1 another at T 2 and he said let on the ideal gas scale T 1 be greater than T 2. See all our scales of temperature Celsius Fahrenheit or ideal gas Kelvin they are set up in such a way that what we feel hot to our hand has a higher numerical value of temperature and what we feel cool like ice is given numerically a lower value of temperature. So, right from our childhood a higher temperature means higher number and hot stuff a lower temperature mean lower number and cold stuff is ingrained into our mind. So, this is higher and lower from that point of view not from any thermodynamic point of view and then he said that if I want a machine here which we today call the refrigerator which should do the job of extracting some heat from the low temperature system say amount q 2 and we want that heat to be if you extract heat from some system you must reject it or make it available to some other system. We want to make it available to the system at a higher temperature and let us say this is an engine. So, like steam engine it will work in cycles you know same thing it will do again and again then he said that I can create such an engine provided I provides work to it. So, it will consume work without consuming work it is not possible to move heat from a low temperature system to a high temperature system. Here work must be made available or the refrigerator will absorb work and that also means a corollary immediate corollary of this is heat by itself cannot flow from a lower temperature to a higher temperature. Now, this is a candidate statement for the second law of thermodynamics and all of us will appreciate that because we know it does not flow from a lower temperature to a higher temperature it flows only from a higher temperature to a lower temperature. But the weakness in the Clausius statement is this assumption that T 1 is higher than T 2 and there is no thermodynamic basis for this. So, the Clausius statement is considered a weak statement of the second law of thermodynamics and hence is not considered to be the candidate for the primary statement. Let me come to Kelvin statement later let us first look at the Karateodori statement. The Karateodori statement of the second law of thermodynamics is today considered with some minor restriction that he is considering almost continuous state space. Perhaps the neatest and mathematically robust statement of the second law of thermodynamics and but that statement is something like this. We understood what is meant by a state space we have understood what is meant by a quasi static process we have understood what is meant by an adiabatic process what Karateodori statement says is the following let me write x 1 x 2 or you can even write p v if you feel like I would prefer to write x 1 x 2. He says that take consider a state of any system and then he says that in the neighborhood of this state there are a few states which are not accessible from this given state by quasi static adiabatic processes what it means is if you start from a given state and execute as you wish processes which are quasi static and adiabatic you will reach only a certain part of the state space quasi static adiabatic process can take you here. But there will be other for example you cannot go here you cannot go here you cannot go here you cannot go here these are states which are not accessible and that is the basic idea for the essential idea of the Karateodori's form of the second law of thermodynamics it talks of non accessibility. So, remember the second law it is some sort of a negative if you go back even Karno theorem was negative it is not possible to exceed the efficiency of a reversible engine in Clausius it is not possible to transfer heat without doing any work from a low temperature system to a high temperature system. And Karateodori's form also says that in the neighborhood of any state there are states which are not accessible or you cannot reach those states by executing quasi static adiabatic processes. We will now come to the Kelvin statement of it was properly developed by Kelvin and Planck. So, we will say the Kelvin Planck statement of the second law K p in a simple sketch it can be said like this you take a system at some temperature T 1 and remember here we are not talking of higher and lower temperature because we are talking of a system at some state let the temperature be T 1. Then if I take another system which executes only cyclic processes I try to extract heat from this system and aim is to convert it completely into work the cyclic process during any cycle I want only two types of interaction heat interaction of heat absorption from the system which we are looking at and producing a positive amount of work that means raising a weight. And the Kelvin Planck statement says that this is not possible and we should understand this for what it is we may write it in different types of big wordy statements that you will find being done in any thermodynamics book that the simple idea here is it is not possible for us to set up a cyclic device for a device which executes only cyclic processes which will do only the following extract heat from a single system and produce a positive amount of work. This is the basic idea of the Kelvin Planck statement and now all other derivations everything else from the second law pertaining to the second law definition of higher and lower temperature thermodynamic scale of temperature maximum efficiency of an engine maximum coefficient of performance of a refrigerator the idea of entropy all the things will follow from this single statement the Kelvin Planck statement of the second law of thermodynamics. Now before we proceed further some definitions so that instead of saying something in 20 words we can say it in 2 or 3 words some definitions are needed from the understanding point of you some definitions are needed from the proper for proper quantification some definitions are needed only for simplification of arguments. The first definition is that of a heat engine and then we will also define its efficiency and then heat engine is a cyclic device which will produce a proper positive amount of work that is our heat engine we define it properly. We will also define its efficiency because that is needed to prove Carnot's theorem and to do many other things. So, this is for short form understanding this is for quantification and for simplicity of arguments we will define what is known as a thermal reservoir which we will quite often shorten only to a reservoir actually the full name is constant temperature or fixed temperature thermal energy reservoir but we will shorten it to thermal reservoir or simply reservoir. First the idea of a heat engine our definition of a heat engine symbol will be E and it will be a cyclic device that means anytime I try to work an engine say tap it or press a start button it will execute exactly one cycle or an integral number of cycles it will never stop in between. So, all processes of an engine which we will consider will be cyclic processes unless we are after developing the second law of thermodynamics completely if we want to look at the internal workings of an engine then we will split the cycle into its individual processes but so long as we are doing the arguments pertaining to the second law of thermodynamics an engine is something which is a cyclic device and the moment we try to do or make it work it will execute one cycle or two cycles or three cycles or no cycle. Because of this remember that it every time we try to do something for this engine delta E will always be 0 for any process and no change of state moment you try to execute a cycle and there is no change of state that is first requirement of an engine. The second requirement of engine is that it must produce a positive amount of work that means it must have the ability to help us raise the weight in a gravitational field or do something useful which is similar to that which we all agree is a work interaction and of course because delta E is 0 and we may say see some part of the cycle it may absorb work some part of the cycle it will do work but the net work has to be greater than 0. So, sometimes we will put the subscript net here and of course first law has to be satisfied so if delta E is 0 the net work done in 0 the net heat absorbed also has to be positive if this is positive this also has to be positive q net has to be greater than 0 w net has to be greater than 0 this is our idea of a heat engine. Now let us look at the idea of efficiency of heat engine now we look at the working of an engine for engine we will typically use a circle with a symbol E in it let sum up all work interactions and we know that work has to be positive net work. Now let us look at the details of the heat interaction and you will agree that during part of the cycle during some part of the cycle heat will be absorbed some other part of the cycle heat will be rejected. Let us separate out all those interactions in which heat is being absorbed from those interactions in which heat is being rejected I will show the heat transfer in the other direction. This thing we will say this is the amount of heat absorbed during the cycle and what comes out is the amount of heat rejected in the cycle. We are modifying our sign convention a bit this arrow should have been inside and the q rejected should have a negative number. But we will say that just for of algebraic simplicity and just to keep ourselves aligned with all the text books on thermodynamics we will now modify our sign convention for heat to say heat absorbed by the system here is positive and heat rejected will be noted as q rejected with a arrow outside. So, that the first law for an engine delta e any way it is 0 this net work will be or if you want you can even say w net is q absorbed minus q rejected and both are positive numbers. But this heat interaction is from the engine to some surrounding systems heat absorbed are all sum up of all interactions of the heat kind from some surrounding systems to the engine. Now with this thing the definition of the efficiency of a heat engine this is defined to be w net divided by q and if you apply first law this will turn out to be 1 minus q rejected divided by q this is the definition this is a consequence of using the definition as well as the first law. So, we have defined what is a heat engine for convenience we have defined what is the efficiency of a heat engine and while defining that we have defined w or w net q absorbed and q rejected at least for the purpose of thermodynamics we do not have to split w net into its components all we should be satisfied is that w net should be greater than 0 unless it is greater than 0 it is not an engine. So, net q has to be split into q absorbed and q rejected. Now we come to the third definition and that of a thermal reservoir this is required only for convenience we can derive everything without a thermal reservoir, but then with thermal reservoir we can get away with algebra without thermal reservoir we will have to work with the differential and integration and the calculus will become mathematics will become more complicated. The thermal reservoir is a thermodynamic system such that the finite amount of or from it does not change it is. So, the idea is you take away some amount of energy in the form of heat or you supply some energy in the form of heat the temperature does not change in actual practice you can create such things you know large bodies a large tank containing water heat it up slightly extract heat slightly the temperature is not going to change significantly. So, you can say it is approximately a thermal reservoir, but on the other hand you can make an exact thermal reservoir by a trick something like this you can have a system a cloth system containing say water comes steam and at a pressure of say 1 atmosphere what will be its temperature temperature will be 100 degree c and let us say it is half water half steam trinaceous fraction 0.5 and now I supply some amount of heat or I extract some amount of heat and allow it to expand and contract while the pressure is maintained at 1 atmosphere. What will happen? So, long as I do not extract such a large amount of heat or supply such a large amount of heat that all the steam condenses or all the water evaporates the temperature is going to remain at 100 degree c because it is going to move along that isobar in the wet zone pressure is maintained constant. So, temperature will also be maintained constant. So, this is a situation where I can take out a finite amount of heat or supply a finite amount of heat and still maintain the temperature of that system to be constant. Another way of doing this is what is done in engines you have a chamber in which you burn fuel by supplying enough amount of oxygen or air and you take out the exhaust extract the heat as required and you can maintain the temperature by burning just the right amount of fuel similarly, you could have a system containing a coil of cooling water and you can supply some amount of heat and supply enough flow of water at a low enough temperature. So, that the temperature on this surface is maintained constant. So, there are enough systems in practice in which you can create a thermal reservoir, but the issue is we do not have to create a thermal reservoir the thermal reservoir here will be used only for ease of argument and ease of mathematics. Now, after having done that after having defined these three entities heat engine its efficiency and a thermal reservoir. Now, let us get into the real scheme of things we will now define modify or qualify the definition of a heat engine by an engine a 1 T heat engine a 2 T heat engine etcetera and an N T heat engine 3 T 4 T 5 T this 1 T 2 T represents the number of heat reservoirs that an engine may interact with. For example, a 1 T heat engine will look like this it absorbs heat only from one reservoir at temperature say T 1 I think I forgot to mention when we talk of a reservoir here I can change the pressure and I can change the temperature at which the reservoir is maintained. Here I can change the amount of fuel and air and maintain the temperature at which the furnace is maintained I can change the temperature of water and its flow rate and change the temperature at which this surface is maintained. So, the moment you have a thermal reservoir it will be characterized by its temperature T. So, I can talk of a reservoir at temperature T 1 a reservoir at temperature T 2 and so on. So, a 1 T heat engine will look like this it interacts thermally only with a single thermal energy reservoir whereas, a 2 T heat engine will look like this T 1 T 2 work must be greater than 0 I will not write it every time, but that will be assume this is Q 1 and Q 2 could either be like this or like this anyone of them could be in and out here it has to be in here it could be in and out here it could be in and out this is a 2 T heat engine and N T heat engine will be 1 which produces work and interacts with T 1 T 2 a number of them T n. Now, immediately you will notice something the first thing we notice is that the Kelvin Planck statement says that it is not possible for us to have a 1 T heat engine. Not possible why because it violates Kelvin Planck statement and quite often we will come to this not possible because this violates the Kelvin Planck statements of statement of the second law and we will now simply shorten it to this is not possible because it violates the second law Kelvin Planck statement if it violates it will violate the second law. Now, we are at a stage where we can get into the nitty gritty of the development of the second law of the model we have come to the conclusion that 1 T heat engine not possible what about 2 T heat engines let us see now the fun begins. Now, the moment we say a 2 T heat engine we can show it like this T 1 T 2 and naturally if you want it to have 2 T that means we must have T 1 not equal to T 2 otherwise it is equivalent to a single heat engine because the energy can come from the same temperature and because we are saying T 1 not equal to T 2 we are not getting into any trap we are not saying which is higher end which is lower we are just saying that they are different and 0 th law will allow us to check whether they are different or not just allow them to interact across a diathermic wall if there is a heat interaction some way or the other we say that T 1 is not equal to T 2. Now, let us assume that because W is positive the net absorption of heat from T 1 and T 2 has to be positive, but it is possible that that means at least 1 of them must supply heat to this engine the other one can supply or the engine can reject some heat to T 2. Let us assume that the heat absorbed from Q 1 is positive and let us assume that the heat absorbed from Q 2 is also positive the question we ask now is this possible and now we will demonstrate something funny we will go like this we say that if it is not possible then we must be able to show that it violates the second law and our trick will always be this by simple means can we argue out that this is equivalent to a 1 T heat engine if we can show that it is equivalent to a 1 T heat engine then naturally it violates the second law of thermodynamics. We start by saying that T 1 is not equal to T 2 that means T 1 and T 2 are not isothermal reservoirs and hence if I allow them to interact with each other not through the engine directly there will be heat transfer either from T 1 to T 2 or from T 2 to T 1. Let us assume and we are not losing any generality here let us assume that the when we allow direct interaction between T 1 and T 2 the interaction takes place like this. From T 1 to T 2 and this would be through some means of conduction or radiation and that area or that conductance we can always adjust. So, that what comes from here to here is Q 2 and if we do that what we would have set up is an engine like this an engine which does a net amount of work and which has the following from 1 to T 2. From a reservoir at T 1 it absorbs heat Q 1 and from T 1 through an intermediary system T 2 it absorbs heat Q 2. Now, I can notice that this reservoir absorbs Q 2 and rejects Q 2. So, essentially it does nothing I might as well take it out of our contention or I can say that this whole thing is now my extended engine and it is working only by absorbing energy from this reservoir at T 1. So, that means this is equivalent to a 1 T heat engine that means this violates the Kelvin Planck statements of the second law and that means our assumption that a 2 T heat engine can work by absorbing heat from 1 reservoir and absorbing heat also absorbing heat from another reservoir at a different temperature is not possible. Look at our argument all that we have done is used 0th law and the fact that T 1 is not equal to T 2 thus making it a 2 T heat engine to assert that heat will either flow from T 1 to T 2 or from T 2 to T 1. I have assumed that let it flow from T 1 to T 2 and said that it violates the second law, but you can also assume it to go from T 2 to T 1 and still show that it violates the second law that is the first item of homework for you. But for us to realize now is that we cannot now assume that for a 2 T heat engine the engine will absorb heat from each one of the two reservoirs that is not possible. So, now let us check the other possibility let us say that we have the two reservoirs T 1 and T 2 we have our engine E which produces work and let us say that I am not committing the same mistake which we did earlier and assuming that it absorbs from both reservoirs let us say it absorbs from T 1 and rejects to T 2 and let us say that as earlier because it is a 2 T heat engine T 1 is not equal to T 2. Now, remember here it is absorbing here it is rejecting. So, now does it violate second law you will notice that if you assume that when you connect T 1 and T 2 the heat flow is like this nothing goes wrong because anyway this is absorbing and this also is going from T 1 to T 2. So, we are not in a position to violate the second law what about the other way round we are on to something here. So, if you say this is Q 3 greater than 0 is no violation of second law. Now, what about the other way round let us say that maybe I should go on the next page I have T 1 I have T 2 I have my engine E which produces W T 1 is not equal to T 2 and the engine is working in such a way that it is absorbing Q 1 it is absorbing Q rejecting Q 2 to T 2. Now, let me say that since T 1 is not equal to T 2 the 0th law said that look one way at least is possible heat will go from T 1 to T 2 if you allow it to go directly that means allow them to interact across a diatomic partition or it will go from T 2 to T 1. We said let it go from T 1 to T 2 and any amount of Q 3 goes from T 1 to T 2 we say that look we are not getting into any violation of second law. I can extend this engine all that will happen is its efficiency will be lower and lower. But now let us say and let me assume that when the engine is working like this and if I allow this system 2 and system 1 to interact across a diatomic partition let there be a heat flow Q 3. Now, the question is this possible and you will immediately now realize that by adjusting the heat flow Q 3 if I make this Q 3 equal to Q 2 I am getting into trouble why am I getting into trouble because now I notice that this system absorbs it Q 2 and rejects that Q 2 to T 1 that means if I consider this as my cyclic device the state here is not changing anyway this is a cyclic device. So, the state of this is not changing state of this will not change because it is absorbing Q 2 and rejecting Q 2 and this totally device it is such that it absorbs Q 1 minus Q 2 from the reservoir at T 1 and produces a positive work W. So, this is equivalent to a 1 T heat engine which violates the Kelvin Planck statement of the second law by the way we should mention here that the second law of thermodynamics the word adjective second law is not unique to thermodynamics we have Newton's second law of motion Kepler's second law of planetary motion of course, that is not a fundamental law that is derivable from Newton's law of motion and the law of gravitation. But the second law of thermodynamics has such a impressive status such a heavy weight associated with it that anywhere whether it is an argument in engineering argument in physics chemistry or even in philosophy when you mention second law nobody will ask you what second law you are talking about by default it is assumed to be the second law of thermodynamics. If you want to say that you are talking about the second law of motion of Newton you will have to say so, but if you simply say second law everybody by default will assume the second law of thermodynamics anyway we are studying thermodynamics. So, our second law is definitely the second law of thermodynamics. Now what does this mean this violates that means what we have derived using the Kelvin Planck statement and simple arguments and the zeroth law of thermodynamics is the following is that if an engine works like this absorbing heat from a reservoir at T 1 rejecting heat to another reservoir at T 2 such that T 1 is not equal to T 2 then a direct transfer of heat from T 1 to T 2 is whereas, a direct transfer of heat let me write this as q 1 to 2 write this as q 2 to 1 is not possible and now you will say many of you will jump and many of my students jump. So, but sirs that is that is because now T 2 is lower temperature than T 1, but remember we have not defined T 2 to be a lower temperature than T 1 all that we have said is let T 1 be not equal to T 2 and we have already shown that it is not possible to have a 2 T heat engine absorbing heat from both system 1 and system 2, but this seems to be possible all that we have shown is that if this is possible there is no violation with this and this, but this and this is impossible of course this gives us an idea of what a lower temperature could be defined as and what a higher temperature could be defined as.


And outside Africa, Russian shells hit a residential area close to Kharkiv Airport on Tuesday.  Firemen battled to put out the flames that engulfed the school, located less than half a kilometer from the passenger terminal of Kharkiv Airport and prevented the fire from spreading. Two people were injured in the fire. Ukraine's Defense Ministry says Russia is preparing to launch a fresh assault in eastern Ukraine to try to take the city of Kharkiv and encircle Ukraine's heavily fortified eastern front line.