[User] Please transcribe this text

[Assistant] But chromosomes can also break apart due to radiation or other damaging agents, which can result in a few different things. First we can observe deletion.


[User] Please transcribe this text

[Assistant] This is where an entire fragment of a chromosome is lost, which may result in missing genes.


[User] Please transcribe this text

[Assistant] This fragment may also become attached to the sister chromatid, which would produce a duplication, or two identical sections on the same chromosome.


[User] Please transcribe this text

[Assistant] Attachment can also occur on a homologous chromosome, whereby the sections will not be precisely identical.


[User] Please transcribe this text

[Assistant] This fragment may reattach to the original chromosome, but have flipped the other way first, resulting in an inversion.


[User] Please transcribe this text

[Assistant] And lastly, the fragment can attach to a completely different non-homologous chromosome, resulting in translocation.


[User] Please transcribe this text

[Assistant] Deletion and duplication is relatively common during crossing over in meiosis.


[User] Please transcribe this text

[Assistant] This can happen when the segments of DNA that are exchanged are not of equal length.


[User] Please transcribe this text

[Assistant] Such that one loses information and the other gains it, hence one deletion and one duplication.


[User] Please transcribe this text

[Assistant] If two gametes with significant deletion in the same location are involved in fertilization, it can result in a zygote that is missing a number of genes, which can very easily lead to miscarriage or death in early childhood.


[User] Please transcribe this text

[Assistant] Much progress has been made in linking certain conditions to specific chromosomal deletions or translocations, which represents a huge step forward for science. And with that, we have a better understanding of chromosomes as well as fascinating alterations in their number and structure.


[User] Please transcribe this text

[Assistant] Thanks for watching, subscribe to my channel for more tutorials, support me on patreon so I can keep making content, and as always, feel free to email me at


[User] Please transcribe this text

[Assistant] Welcome to this video in learning Elasticsearch 5.0, entitled Installing Elasticsearch. In this video,


[User] Please transcribe this text

[Assistant] We're going to go through the steps of installing Elasticsearch. We're going to start up the cluster via command line.


[User] Please transcribe this text

[Assistant] In addition to we're going to install a tool for data visualization and that tool is known as cabana.


[User] Please transcribe this text

[Assistant] Now the reason why we're installing Cabana at this point is because Cabana has a neat developer tool that allows us to


[User] Please transcribe this text

[Assistant] Essentially interact with our cluster, add documents, remove documents and a very clean interface. And also we're going to view cabana from the browser. Cabana is browser based. First, before we get started, you need to know that before you install Elasticsearch 5.0,


[User] Please transcribe this text

[Assistant] You need to have at least Java 7 or higher installed on your system. Moving onto installation.


[User] Please transcribe this text

[Assistant] Installing Elasticsearch. First you need to download from a specified location.


[User] Please transcribe this text

[Assistant] And that's based on your operating system. So me, I'm using the Mac version.


[User] Please transcribe this text

[Assistant] Then you extract the downloaded file into a directory, you map to that directory and you run a specific command to start the cluster. In that command.


[User] Please transcribe this text

[Assistant] Is Ben forward slash elastic search for Unix and we reverse it for Windows. Installing Kibana is pretty straight forward as well.


[User] Please transcribe this text

[Assistant] Same thing pretty much, you download the zip file.


[User] Please transcribe this text

[Assistant] You extract it into a directory and you map to that directory. Kibana has an extra step, however. What you have to do is you have to edit the Kibana configuration file.


[User] Please transcribe this text

[Assistant] And then once you edited the configuration file, you can go through the process of running the command. And then you point your browser to localhost port 5601, which is where it can ban arrests. So let's get to the installation.


[User] Please transcribe this text

[Assistant] Here I've downloaded both files, one for Elasticsearch and the other for Kibana. What I'm going to do is I'm simply going to extract first the Elasticsearch. Now what I tend to do is I'll rename it to something more intuitive.


[User] Please transcribe this text

[Assistant] And that makes it easier for me to use command line to get to that directory. We're going to do the same thing with Kibana.


[User] Please transcribe this text

[Assistant] Now remember earlier when I told you that you needed to edit the configuration file for Kibana. That configuration file is located inside the Kibana directory and in the config subdirectory. That file is named Kibana.yml. So I right click and I use a text editor.


[User] Please transcribe this text

[Assistant] And when you do that, that's going to make this command active. And then you save it.


[User] Please transcribe this text

[Assistant] Close it. We go back. So now within this ES directory, I have subdirectory elastic search and have subdirectory cabana. Now I'm going to go into command line as you can see here.


[User] Please transcribe this text

[Assistant] Okay, now I'm going to first go to the Elasticsearch directory.


[User] Please transcribe this text

[Assistant] And it's going to start up the Elasticsearch cluster. Once the Elasticsearch cluster starts, then we'll go into starting Kibana. Okay. So the Elasticsearch cluster is starting. So let's go to windows and let's open a new window.


[User] Please transcribe this text

[Assistant] We have successfully started our elastic search cluster. Okay, so now that we've started our elastic search cluster.


[User] Please transcribe this text

[Assistant] So now the command has started, we're just interested right now in the development. So we go to the development tool. I previously added an index, but what we want to do is just quickly I'll show you.


[User] Please transcribe this text

[Assistant] If you say simply put, let me say something, which is the name of the index, and then we run it.


[User] Please transcribe this text

[Assistant] It's successfully added. If we want to check it, we could just say. Get.


[User] Please transcribe this text

[Assistant] And there you go. It shows and confirms that the index was successfully created and we'll get back to this later.


[User] Please transcribe this text

[Assistant] But right now, the most important thing is that we've installed Elasticsearch and we've installed Kibana for the purpose of using the dev tool to quickly run queries. This concludes this video. Up next, we'll be looking at the goal of Elasticsearch.


[User] Please transcribe this text

[Assistant] I wanted to give you a heads up, before you got here.


[User] Please transcribe this text

[Assistant] I wanted to give you a heads up, before you got here.


[User] Please transcribe this text

[Assistant] I wanted to give you a heads up, before you got here.


[User] Please transcribe this text

[Assistant] I wanted to give you a heads up, before you got here.


[User] Please transcribe this text

[Assistant] Life has its ups and downs and each person has to come to terms with


[User] Please transcribe this text

[Assistant] Life has its ups and downs and each person has to come to terms with


[User] Please transcribe this text

[Assistant] Life has its ups and downs and each person has to come to terms with


[User] Please transcribe this text

[Assistant] Life has its ups and downs and each person has to come to terms with


[User] Please transcribe this text

[Assistant] I was hoping to sweep her off her feet, but she just laughed


[User] Please transcribe this text

[Assistant] I was hoping to sweep her off her feet, but she just laughed


[User] Please transcribe this text

[Assistant] I was hoping to sweep her off her feet, but she just laughed


[User] Please transcribe this text

[Assistant] I was hoping to sweep her off her feet, but she just laughed


[User] Please transcribe this text

[Assistant] Every time you do something like this, you just sweep me off my feet.


[User] Please transcribe this text

[Assistant] Every time you do something like this, you just sweep me off my feet.


[User] Please transcribe this text

[Assistant] Every time you do something like this, you just sweep me off my feet.


[User] Please transcribe this text

[Assistant] Every time you do something like this, you just sweep me off my feet.


[User] Please transcribe this text

[Assistant] Why don't you let your hair down? Come whenever it suits you.


[User] Please transcribe this text

[Assistant] Why don't you let your hair down? Come whenever it suits you.


[User] Please transcribe this text

[Assistant] Why don't you let your hair down? Come whenever it suits you.


[User] Please transcribe this text

[Assistant] Why don't you let your hair down? Come whenever it suits you.


[User] Please transcribe this text

[Assistant] Let your hair down and enjoy yourself at the party.


[User] Please transcribe this text

[Assistant] Let your hair down and enjoy yourself at the party.


[User] Please transcribe this text

[Assistant] Let your hair down and enjoy yourself at the party.


[User] Please transcribe this text

[Assistant] Let your hair down and enjoy yourself at the party.


[User] Please transcribe this text

[Assistant] He kept shipping away at the, problem until he had solved it


[User] Please transcribe this text

[Assistant] He kept shipping away at the problem until he had solved it


[User] Please transcribe this text

[Assistant] He kept shipping away at the, problem until he had solved it


[User] Please transcribe this text

[Assistant] He kept shipping away at the, problem until he had solved it


[User] Please transcribe this text

[Assistant] He's been sitting pretty ever since. He got that new job


[User] Please transcribe this text

[Assistant] He's been sitting pretty ever since. He got that new job


[User] Please transcribe this text

[Assistant] He's been sitting pretty ever since. He got that new job


[User] Please transcribe this text

[Assistant] He's been sitting pretty ever since. He got that new job


[User] Please transcribe this text

[Assistant] You have the last laugh. Congratulations on your success.


[User] Please transcribe this text

[Assistant] You have the last laugh. Congratulations on your success.


[User] Please transcribe this text

[Assistant] You have the last laugh. Congratulations on your success.


[User] Please transcribe this text

[Assistant] You have the last laugh. Congratulations on your success.


[User] Please transcribe this text

[Assistant] He didn't need the money, he just took the job for laughs.


[User] Please transcribe this text

[Assistant] He didn't need the money, he just took the job for laughs.


[User] Please transcribe this text

[Assistant] He didn't need the money, he just took the job for laughs.


[User] Please transcribe this text

[Assistant] He didn't need the money, he just took the job for laughs.


[User] Please transcribe this text

[Assistant] The entire project was dropped in my lap after Jason resigned.


[User] Please transcribe this text

[Assistant] The entire project was dropped in my lap after Jason resigned.


[User] Please transcribe this text

[Assistant] The entire project was dropped in my lap after Jason resigned.


[User] Please transcribe this text

[Assistant] The entire project was dropped in my lap after Jason resigned.


[User] Please transcribe this text

[Assistant] As long as he gets to spend time with his wife, he'll be happy as a clam


[User] Please transcribe this text

[Assistant] As long as he gets to spend time with his wife, he'll be happy as a clam


[User] Please transcribe this text

[Assistant] As long as he gets to spend time with his wife, he'll be happy as a clam


[User] Please transcribe this text

[Assistant] As long as he gets to spend time with his wife, he'll be happy as a clam


[User] Please transcribe this text

[Assistant] I'm happy as a clam since moving. Close to be with you.


[User] Please transcribe this text

[Assistant] I'm happy as a clam since moving. Close to be with you.


[User] Please transcribe this text

[Assistant] I'm happy as a clam since moving. Close to be with you.


[User] Please transcribe this text

[Assistant] I'm happy as a clam since moving. Close to be with you.


[User] Please transcribe this text

[Assistant] We're all counting on you to step up to the plate and get this job done.


[User] Please transcribe this text

[Assistant] We're all counting on you to step up to the plate and get this job done.


[User] Please transcribe this text

[Assistant] We're all counting on you to step up to the plate and get this job done.


[User] Please transcribe this text

[Assistant] We're all counting on you to step up to the plate and get this job done.


[User] Please transcribe this text

[Assistant] Well, let's give him a chance to put in his two cents worth


[User] Please transcribe this text

[Assistant] Well, let's give him a chance to put in his two cents worth


[User] Please transcribe this text

[Assistant] Well, let's give him a chance to put in his two cents worth


[User] Please transcribe this text

[Assistant] Well, let's give him a chance to put in his two cents worth


[User] Please transcribe this text

[Assistant] You want a life of happiness, a roof over your head?


[User] Please transcribe this text

[Assistant] You want a life of happiness, a roof over your head?


[User] Please transcribe this text

[Assistant] You want a life of happiness, a roof over your head?


[User] Please transcribe this text

[Assistant] You want a life of happiness, a roof over your head?


[User] Please transcribe this text

[Assistant] You needn't talk to anyone, if you don't want to.


[User] Please transcribe this text

[Assistant] You needn't talk to anyone, if you don't want to.


[User] Please transcribe this text

[Assistant] You needn't talk to anyone, if you don't want to.


[User] Please transcribe this text

[Assistant] You needn't talk to anyone, if you don't want to.


[User] Please transcribe this text

[Assistant] I wanted to give you a heads up, before you got here.


[User] Please transcribe this text

[Assistant] I wanted to give you a heads up, before you got here.


[User] Please transcribe this text

[Assistant] I wanted to give you a heads up, before you got here.


[User] Please transcribe this text

[Assistant] I wanted to give you a heads up, before you got here.


[User] Please transcribe this text

[Assistant] Life has its ups and downs and each person has to come to terms with


[User] Please transcribe this text

[Assistant] Life has its ups and downs and each person has to come to terms with


[User] Please transcribe this text

[Assistant] Life has its ups and downs and each person has to come to terms with


[User] Please transcribe this text

[Assistant] Life has its ups and downs and each person has to come to terms with


[User] Please transcribe this text

[Assistant] I was hoping to sweep her off her feet, but she just laughed


[User] Please transcribe this text

[Assistant] I was hoping to sweep her off her feet, but she just laughed


[User] Please transcribe this text

[Assistant] I was hoping to sweep her off her feet, but she just laughed


[User] Please transcribe this text

[Assistant] I was hoping to sweep her off her feet, but she just laughed


[User] Please transcribe this text

[Assistant] Why don't you let your hair down? Come whenever it suits you.


[User] Please transcribe this text

[Assistant] Why don't you let your hair down? Come whenever it suits you.


[User] Please transcribe this text

[Assistant] Why don't you let your hair down? Come whenever it suits you.


[User] Please transcribe this text

[Assistant] Why don't you let your hair down? Come whenever it suits you.


[User] Please transcribe this text

[Assistant] He kept shipping away at the, problem until he had solved it


[User] Please transcribe this text

[Assistant] He kept shipping away at the problem until he had solved it


[User] Please transcribe this text

[Assistant] He kept shipping away at the, problem until he had solved it


[User] Please transcribe this text

[Assistant] He kept shipping away at the, problem until he had solved it


[User] Please transcribe this text

[Assistant] Every time you do something like this, you just sweep me off my feet.


[User] Please transcribe this text

[Assistant] Every time you do something like this, you just sweep me off my feet.


[User] Please transcribe this text

[Assistant] Every time you do something like this, you just sweep me off my feet.


[User] Please transcribe this text

[Assistant] Every time you do something like this, you just sweep me off my feet.


[User] Please transcribe this text

[Assistant] Let your hair down and enjoy yourself at the party.


[User] Please transcribe this text

[Assistant] Let your hair down and enjoy yourself at the party.


[User] Please transcribe this text

[Assistant] Let your hair down and enjoy yourself at the party.


[User] Please transcribe this text

[Assistant] Let your hair down and enjoy yourself at the party.


[User] Please transcribe this text

[Assistant] You have the last laugh. Congratulations on your success.


[User] Please transcribe this text

[Assistant] You have the last laugh. Congratulations on your success.


[User] Please transcribe this text

[Assistant] You have the last laugh. Congratulations on your success.


[User] Please transcribe this text

[Assistant] You have the last laugh. Congratulations on your success.


[User] Please transcribe this text

[Assistant] He's been sitting pretty ever since. He got that new job


[User] Please transcribe this text

[Assistant] He's been sitting pretty ever since. He got that new job


[User] Please transcribe this text

[Assistant] He's been sitting pretty ever since. He got that new job


[User] Please transcribe this text

[Assistant] He's been sitting pretty ever since. He got that new job


[User] Please transcribe this text

[Assistant] He didn't need the money, he just took the job for laughs


[User] Please transcribe this text

[Assistant] He didn't need the money, he just took the job for laughs.


[User] Please transcribe this text

[Assistant] He didn't need the money, he just took the job for laughs.


[User] Please transcribe this text

[Assistant] He didn't need the money, he just took the job for laughs.


[User] Please transcribe this text

[Assistant] The entire project was dropped in my lap after Jason resigned


[User] Please transcribe this text

[Assistant] The entire project was dropped in my lap after Jason resigned.


[User] Please transcribe this text

[Assistant] The entire project was dropped in my lap after Jason resigned


[User] Please transcribe this text

[Assistant] Well, let's give him a chance to put in his two cents worth


[User] Please transcribe this text

[Assistant] Well, let's give him a chance to put in his two cents worth


[User] Please transcribe this text

[Assistant] Well, let's give him a chance to put, in his two cents worth


[User] Please transcribe this text

[Assistant] Well, let's give him a chance to put in his two cents worth


[User] Please transcribe this text

[Assistant] As long as he gets to spend time with his wife, he'll be happy as a clam


[User] Please transcribe this text

[Assistant] As long as he gets to spend time with his wife, he'll be happy as a clam


[User] Please transcribe this text

[Assistant] As long as he gets to spend time with his wife, he'll be happy as a clam


[User] Please transcribe this text

[Assistant] As long as he gets to spend time with his wife, he'll be happy as a clam


[User] Please transcribe this text

[Assistant] I'm happy as a clam since moving. Close to be with you.


[User] Please transcribe this text

[Assistant] I'm happy as a clam since moving. Close to be with you.


[User] Please transcribe this text

[Assistant] I'm happy as a clam since moving. Close to be with you.


[User] Please transcribe this text

[Assistant] I'm happy as a clam since moving. Close to be with you.


[User] Please transcribe this text

[Assistant] You needn't talk to anyone, if you don't want to.


[User] Please transcribe this text

[Assistant] You needn't talk to anyone, if you don't want to.


[User] Please transcribe this text

[Assistant] You needn't talk to anyone, if you don't want to.


[User] Please transcribe this text

[Assistant] You needn't talk to anyone if you don't want to.


[User] Please transcribe this text

[Assistant] We're all counting on you to step up to the plate and get this job done.


[User] Please transcribe this text

[Assistant] We're all counting on you to step up to the plate and get this job done.


[User] Please transcribe this text

[Assistant] We're all counting on you to step up to the plate and get this job done.


[User] Please transcribe this text

[Assistant] We're all counting on you to step up to the plate and get this job done.


[User] Please transcribe this text

[Assistant] You want a life of happiness, a roof over your head?


[User] Please transcribe this text

[Assistant] You want a life of happiness, a roof over your head?


[User] Please transcribe this text

[Assistant] You want a life of happiness, a roof over your head?


[User] Please transcribe this text

[Assistant] You want a life of happiness, a roof over your head?


[User] Please transcribe this text

[Assistant] It's time for an exercise now. In this exercise, we're going to try out some of the concepts we've learned in this unit. And we're going to be doing this by using


[User] Please transcribe this text

[Assistant] We're going to create a list of those objects and we're going to try out a few


[User] Please transcribe this text

[Assistant] Exercise. So this is going to be a starting bind for you to work on. Uhm, I have a main method here.


[User] Please transcribe this text

[Assistant] And uh, this is where I'm going to be adding some stuff and I will expect you to implement.


[User] Please transcribe this text

[Assistant] Some of these steps using Landas. So I'm going to create a person class first, because we'll be using that.


[User] Please transcribe this text

[Assistant] To create our list. So this person class is gonna contain a bunch of, uh,


[User] Please transcribe this text

[Assistant] private variables and public getters and setters. So let's say I want to have something like a name, a first name, a last name, and an age. I'm going to spare you all the typing, I've just copy pasted this stuff. So it's basically three


[User] Please transcribe this text

[Assistant] Member variables, the first name, the last name, and the age. There is a constructor here which takes in those three member variables and then sets it. So we can create these person objects easily.


[User] Please transcribe this text

[Assistant] We have getters and setters for all those three member variables and then we have a two string method.


[User] Please transcribe this text

[Assistant] Which prints out the person and object in a nice format.


[User] Please transcribe this text

[Assistant] Now this is what we're going to be using in our exercise. So I'm going to create a list of person objects.


[User] Please transcribe this text

[Assistant] I'm going to initialize this list with the arrays.forList method.


[User] Please transcribe this text

[Assistant] So the arrays.file list takes in a list of import arrays. It's going to take in a list of person objects and it's going to give me a list.


[User] Please transcribe this text

[Assistant] That I can assign to this people variable. So what I'm gonna do is I'm gonna create, I'm gonna call this person object constructor with a bunch of values. I've copy pasted these constructors again in the interest of time. So I have like a bunch of person objects being created.


[User] Please transcribe this text

[Assistant] So first name, a last name, and an age, so that it calls that, uh,


[User] Please transcribe this text

[Assistant] Start a list by last name. And then, step two.


[User] Please transcribe this text

[Assistant] Create a method that prints all elements in the list. And then step three, create a method that prints


[User] Please transcribe this text

[Assistant] So these are the three things that we should do. That's this exercise, right? You have a list of people here. First, start it by the last name.


[User] Please transcribe this text

[Assistant] And then create a method that prints all those elements, you can actually call this here as a part of step two. And then step three, create a method that prints all the people who are the same as step two, but with the condition of the last name beginning with the letter C. So in this case, this would just be Lewis Carroll and Thomas Carlisle.


[User] Please transcribe this text

[Assistant] How do you implement this method? It really depends on what approach you choose. You can either choose the Java 7 approach and you can have inline implementations of objects or


[User] Please transcribe this text

[Assistant] You can do the Java 8 way and create lambdas. So what I'm going to do in the next tutorial is try both of them out, right? I'm going to have the Java 7 implementation.


[User] Please transcribe this text

[Assistant] And then I'm going to have the Java 8 implementation so that you can compare and contrast. So this is the exercise, give it a shot, and I'll see you in the next tutorial where I'll walk through the solution.


[User] Please transcribe this text

[Assistant] Okay, so this is the exercise, and we're gonna try solving this in Java 7. So I'm gonna create a new class here.


[User] Please transcribe this text

[Assistant] Java 7. And I'm gonna have a main method here. And...


[User] Please transcribe this text

[Assistant] What I'll do is copy this over so that we can replace these comments with actual code.


[User] Please transcribe this text

[Assistant] Alright, now the first thing I need to do is to sort the people list by the last name. Now I'm going to do this in Java 7. How do I sort a list? Well you have this utility called Collections.


[User] Please transcribe this text

[Assistant] Which takes in two arguments. One is a list that needs to be sorted.


[User] Please transcribe this text

[Assistant] And one is the competitor. There's also another signature which basically takes this in, uh, which starts a list in ascending order based on natural ordering, but what we need is to create a custom ordering. We want to have a custom ordering based on the last name, which means that we're going to have to implement this competitor. So I'm going to choose this option. I'll first pass in the list. People.


[User] Please transcribe this text

[Assistant] And now I need to pass in a competitor. Now competitor is an interface, right? I need to create an implementation of that interface and pass an instance of it. I could create a separate class.


[User] Please transcribe this text

[Assistant] And then say new of that class, which implements competitor, but I can just create an inline anonymous class here instead. So I'm going to say new competitor.


[User] Please transcribe this text

[Assistant] What does this need? It needs, if I were to add the unimplemented methods here, it just needs one method called compare. Now you need to implement this compare method.


[User] Please transcribe this text

[Assistant] So I'm going to pass that as an argument, a generic argument, which means that these two will be person objects as well. Now, I need to implement this. How do I implement a competitor


[User] Please transcribe this text

[Assistant] So I'm basically leveraging the compare to operation on the last name string and I'm comparing these two instances that I'm getting over here. So when the collection starts to start,


[User] Please transcribe this text

[Assistant] One way to check if this has worked is to actually print it, which it turns out is step two over here. So how do I print all the elements in this list? Well, notice here that I've actually mentioned to create a method that prints all the elements in the list. So I'm going to create a method called printAll.


[User] Please transcribe this text

[Assistant] And, uh, I'm going to pass in the people list. Now print all needs to be a static method in the same class. I'm going to create that here.


[User] Please transcribe this text

[Assistant] Now this is going to call the toString method of person and we have a fan, you know, a nice toString implementation which shows the object in a nice format. So this should be good. I'm gonna go to the solution again here. So this is step two, which is to print all people. Let's execute this and make sure that this is, uh, this is working fine. So if I were to run this.


[User] Please transcribe this text

[Assistant] Here you can see it's printed all the people, but notice that the last name has been sorted. I don't know, first Bronte, Carlisle, Carroll, and Dickens. So it's sorted based on alphabetical order. So step one is done, and step two is done. Now for step three.


[User] Please transcribe this text

[Assistant] We need to create a method that prints all the people that have the last name beginning with C. So we have to filter out anybody who does not have the last name beginning with C. Now what I could do here is create another method.


[User] Please transcribe this text

[Assistant] Which says something like this. Let's say I do a print.


[User] Please transcribe this text

[Assistant] Last name, beginning with C, and then I can pass in people. Now if I were to, spell this right, if I were to implement this method here,


[User] Please transcribe this text

[Assistant] It's going to be pretty much the same here instead.


[User] Please transcribe this text

[Assistant] I'm going to have an if condition here when I loop through and I check if the last name does indeed begin with C. So I can say something like this.


[User] Please transcribe this text

[Assistant] I print that person, alright? If not, then I don't print that person. So that's this method. And of course print all is unaffected now. Let's run this. Now here you see it's printed the list, but the second time you notice it just prints two elements, which is Carlisle and Carol.


[User] Please transcribe this text

[Assistant] This is good, but as you can see, this is not the best of methods. This is very, very inflexible. If you want to print people with the last name beginning with D, that means you're going to have to create another method. It's not ideal. So what we'd like to do is have a behavior passed into this method. So I can have some kind of an object.


[User] Please transcribe this text

[Assistant] That acts as a filter, right? You're not really specifically mentioning what that filter should be.


[User] Please transcribe this text

[Assistant] You can write a method here, which is basically the same as printAll, but rather than printAll,


[User] Please transcribe this text

[Assistant] Let's call it printSum, and then you have, uh, some kind of an object here which indicates what that list should be. It indicates what you need to filter out, or what you need to retain. So let me try that. Let's say I say print... Instead of beginning with C, I can say print...


[User] Please transcribe this text

[Assistant] Here. Now condition needs to be some kind of an interface. Let me actually create an interface here. I'll create it inline here and say interface


[User] Please transcribe this text

[Assistant] condition. And then let's say this condition interface has a boolean test which takes in


[User] Please transcribe this text

[Assistant] So it's basically looking at, it's a, it's a method which looks at a person and sees whether that person should be included or not. For something like, you know, printing the last name beginning with C, this test method basically checks if that person's last name does indeed begin with C. Now I can use this condition to check.


[User] Please transcribe this text

[Assistant] Alright, now I can use this instead. And now I can create, I can pass in a new implementation of this condition interface. I'm going to say condition.


[User] Please transcribe this text

[Assistant] And now I need to implement the unimplemented method, which is the test. So here what I'm going to do is I'm going to say return.


[User] Please transcribe this text

[Assistant] So it's basically the same as what we did before, but rather than the method itself containing explicitly what needs to be done.


[User] Please transcribe this text

[Assistant] I'm basically putting that into a condition object, right? Condition being an interface.


[User] Please transcribe this text

[Assistant] And then I pass in an implementation of that interface which has a method called test.


[User] Please transcribe this text

[Assistant] And it basically says, okay, this test passes only if the last name begins with C. Now if that's the condition that's passed,


[User] Please transcribe this text

[Assistant] Well, that's the condition that gets selected. This method doesn't really care. It just prints a list conditionally, no matter what that condition is. Now, you could have another condition, which, uh, you could say, call printConditionally again, which, you know, checks for the first name that begins with let's see, uh, with let's see C, right? Now, I can run this again, but with a different condition. So, the same method still works.


[User] Please transcribe this text

[Assistant] First name beginning with C, so all that changes is the condition and this.


[User] Please transcribe this text

[Assistant] Print conditionally method doesn't care. It just executes the condition and it runs that for each person in the people list. And if that condition is met, it just prints it. So you can pass in different condition implementations to the same print conditionally method and have it print different stuff. So let's run this.


[User] Please transcribe this text

[Assistant] Now here is printing all people, which prints everybody. This is printing people with the last name beginning with C, which is Carlyle and, uh, Carol. And this is the first name beginning with C, which is


[User] Please transcribe this text

[Assistant] So this is how you can implement this exercise using Java 7. You have passed in a behavior by implementing an interface and you created that interface. Now you know that in Java 8, you can skip the implementation and use lambdas. So let's try that out.


[User] Please transcribe this text

[Assistant] I'm going to create a different class here. I'm going to say new class and this is unit one.


[User] Please transcribe this text

[Assistant] And uh, paste this here and just change the name.


[User] Please transcribe this text

[Assistant] And uhm, of course I don't need the interface here because it's already defined.


[User] Please transcribe this text

[Assistant] Now let me make sure this works fine. So this is still the Java 7 way, right? This still works fine. Now let's change all these things to lambdas.


[User] Please transcribe this text

[Assistant] Now here, let's start with step one. Step one is to start the list by the last name. We need to remove this stuff here.


[User] Please transcribe this text

[Assistant] It's two arguments. The first argument is the list to be sorted.


[User] Please transcribe this text

[Assistant] Second argument is an implementation of the competitor. If you notice, competitor is basically an interface which needs the implementation of the compare method. And since there's only one method here, well guess what, competitor is a functional interface. Since it's a functional interface, you can actually pass in a lambda instead of this inline


[User] Please transcribe this text

[Assistant] Doesn't see the difference, just thinks it's an implementation of competitor while you're actually passing in a lambda. Now how do I pass in a lambda?


[User] Please transcribe this text

[Assistant] The lambda here is basically an implementation of this function over here. It's basically a compare method, which takes in two objects, just person1 and person2, and then it returns


[User] Please transcribe this text

[Assistant] This expression with, uh, the last name being compared, last name that compared to the second last name. So let's do that. And we have a function which takes into arguments, person one and person two. I can do person P1, person P2.


[User] Please transcribe this text

[Assistant] But since Collections knows the type of this list, see this list, people,


[User] Please transcribe this text

[Assistant] Which is a list of person, right? There's a generic type here already. So we don't actually have to specify.


[User] Please transcribe this text

[Assistant] The person over here. So let me remove that in a bit. But what does the lambda expression look like? Lambda expression is, I've copied this, p1.getLastName.compareTo.


[User] Please transcribe this text

[Assistant] P2.getLastName, right? This is all that's happening in the body. Now since type inference works, I can remove these types.


[User] Please transcribe this text

[Assistant] And this will still work. P1 and P2 are obviously of type person. The compiler figures that out.


[User] Please transcribe this text

[Assistant] Let me actually run this. So this happens, sorts the list, and then the next set of lines actually prints it. This method should still work, so if I were to run this, as you can see the first section, it is sorted based on the last name. Alright, let's implement step three.


[User] Please transcribe this text

[Assistant] Creating a method that prints all the people that have the last name beginning with the letter C. Now what did we do here? We called the printConditionally method where we passed in the list of people.


[User] Please transcribe this text

[Assistant] And then we had a condition that was an inline anonymous class implementation.


[User] Please transcribe this text

[Assistant] Now condition is also an interface that has one abstract method, which is test.


[User] Please transcribe this text

[Assistant] So we could use a lambda here instead of the selected block, which is the anonymous inner class. So this could be a lambda. And what is that lambda? It's basically a method which takes in a person object and it returns a boolean, whether that


[User] Please transcribe this text

[Assistant] Person object has a last name that begins with c or not. So this takes in a person object. Since it's just one argument here, I don't have to put the parentheses, right? It's just one argument. So again, that's optional.


[User] Please transcribe this text

[Assistant] What's the body? The body should return a boolean. It says if the last name begins with C, so it's basically P dot.


[User] Please transcribe this text

[Assistant] Alright, and now I can do something similar for printing out people who have the first name that begins with. See, it's very similar except that the last method here changes. Copy this over. It's just gonna be the first name here.


[User] Please transcribe this text

[Assistant] And, uh, this, the first thing we've already seen for last name beginning with C, we have these two.


[User] Please transcribe this text

[Assistant] And for the first name beginning with C we have these two people. So that's all good.


[User] Please transcribe this text

[Assistant] Now here's another thing we can do, and of course we can do this optimization in the Java 7 version as well. So we have a print all, and we have a print conditionally.


[User] Please transcribe this text

[Assistant] But print all is basically a print conditionally that has a condition set to true always, right? So we don't really need these two methods. So I'm going to get rid of this print all.


[User] Please transcribe this text

[Assistant] It's always going to be print conditionally, which means that I'm going to have to call


[User] Please transcribe this text

[Assistant] What's the condition? It's always true. So I'm going to say P.


[User] Please transcribe this text

[Assistant] Text in a value which is the person, then always returns true.


[User] Please transcribe this text

[Assistant] Right? This is a very simple lambda expression, which is a simple implementation of the condition class. So here you see, for something as simple as this, the implementation is just one word. This is one of the shorter lambdas that you can write.


[User] Please transcribe this text

[Assistant] Now what's going to happen is this is going to create a lambda expression which acts as an instance of condition that always returns true. So it's going to do condition.test on that lambda expression and guess what it returns all the time? It just returns true. So system-derived.print.


[User] Please transcribe this text

[Assistant] Always executes and we're gonna print all the people. So let's run this again to make sure we get all the people and we do. So.


[User] Please transcribe this text

[Assistant] Here you see we have made the code very, very terse. It's not as...


[User] Please transcribe this text

[Assistant] Long and complex as the anonymous inner class over here.


[User] Please transcribe this text

[Assistant] The only argument that people have had about this kind of a code is that the lambda expression is not familiar. It takes some getting used to.


[User] Please transcribe this text

[Assistant] Having said that aside, and of course this familiarity leads to you being a bit more comfortable with these lambda expressions. The more you write it, the more familiar you're going to get. And then the advantage of it being, you know, sharp and crisp really stands out. So this was an implementation of that exercise.


[User] Please transcribe this text

[Assistant] In both the Java 7 approach and the Java 8 approach.


[User] Please transcribe this text

[Assistant] So feel free to play around with lambdas a little bit more. See where you have opportunities to use lambdas where there are functional interfaces being accepted as arguments. And trust me, it's really fun. So this wraps up unit one.


[User] Please transcribe this text

[Assistant] And with Unit 2, we're gonna look at some more features that Java 8 introduces when it comes to using these lambda expressions and some more shortcuts you can use in your code to make your code a little bit more readable. So see you in the next unit.


[User] Please transcribe this text

[Assistant] Next time you are in Canada, please drop in on me.


[User] Please transcribe this text

[Assistant] Next time you are in Canada, please drop in on me.


[User] Please transcribe this text

[Assistant] Next time you are in Canada, please drop in on me.


[User] Please transcribe this text

[Assistant] Next time you are in Canada, please drop in on me.


[User] Please transcribe this text

[Assistant] Welcome to this section on Learning Elasticsearch 5.0, entitled, Dichotomy of Elasticsearch.


[User] Please transcribe this text

[Assistant] In this section, we're gonna cover the primary components of Elasticsearch. We're gonna look at index, documents, and the Elasticsearch cluster. This video is entitled, What is an Index? In this video,


[User] Please transcribe this text

[Assistant] We will define an index. We'll look into indices and shards. I'll also give you an analogy involving relational databases. We're going to just looking at the code for adding an index. And finally, I'll show you what happens after an index is created.


[User] Please transcribe this text

[Assistant] An index is a logical namespace that points to one or more shards in an Elasticsearch cluster. It serves as the place to store related data.


[User] Please transcribe this text

[Assistant] Think of shards as partition spaces or containers for data. Technically speaking, a shard is an Apache Lucene instance. We'll get to shards in future videos.


[User] Please transcribe this text

[Assistant] Also keep in mind that an index is broken into shards for scaling purposes.


[User] Please transcribe this text

[Assistant] Which we'll soon discuss as tables within a database, documents as roles within a database table.


[User] Please transcribe this text

[Assistant] Adding an index is as simple as running the following put command. And this is the curl version.


[User] Please transcribe this text

[Assistant] And as a side note, if you want to retrieve all the indices in your cluster, you would run this simple curl command.


[User] Please transcribe this text

[Assistant] And finally, if you're looking for a specific index within a cluster, you'd run this command. I'll be going into the specifics of adding indices in future videos. For now, I just want to quickly show you the commands. By default.


[User] Please transcribe this text

[Assistant] When an index is created, it is assigned a certain number of primary shards. The default is 5.


[User] Please transcribe this text

[Assistant] This is fixed at the time of creation. There is also something known as a replica sharp.


[User] Please transcribe this text

[Assistant] And they can be changed at any time after the indices have been created.


[User] Please transcribe this text

[Assistant] We'll discuss replica shards a bit later in the course as well.


[User] Please transcribe this text

[Assistant] For now, just understand that replicas help to make up the distributed fault-tolerance nature of Elasticsearch and that, by default, one replica is assigned per index. And this concludes this video. Up next, we're going to look at documents in Elasticsearch.


[User] Please transcribe this text

[Assistant] Tomorrow is my day off, so you'd better come after tomorrow.


[User] Please transcribe this text

[Assistant] Tomorrow is my day off, so you'd better come after tomorrow.


[User] Please transcribe this text

[Assistant] Tomorrow is my day off, so you'd better come after tomorrow.


[User] Please transcribe this text

[Assistant] Tomorrow is my day off, so you'd better come after tomorrow.


[User] Please transcribe this text

[Assistant] Most people go through the same routine, day in and day out.


[User] Please transcribe this text

[Assistant] Most people go through the same routine, day in and day out.


[User] Please transcribe this text

[Assistant] Most people go through the same routine, day in and day out.


[User] Please transcribe this text

[Assistant] Most people go through the same routine, day in and day out.


[User] Please transcribe this text

[Assistant] The idea of glasses being a fashion item has been slow to catch on.


[User] Please transcribe this text

[Assistant] The idea of glasses being a fashion item has been slow to catch on.


[User] Please transcribe this text

[Assistant] The idea of glasses being a fashion item has been slow to catch on.


[User] Please transcribe this text

[Assistant] The idea of glasses being a fashion item has been slow to catch on.


[User] Please transcribe this text

[Assistant] I'm dead tired. I'm looking forward to staying in bed.


[User] Please transcribe this text

[Assistant] I'm dead tired. I'm looking forward to staying in bed.


[User] Please transcribe this text

[Assistant] I'm dead tired. I'm looking forward to staying in bed.


[User] Please transcribe this text

[Assistant] I'm dead tired. I'm looking forward to staying in bed.


[User] Please transcribe this text

[Assistant] I'm worried about the quality of this product because it's dirt cheap.


[User] Please transcribe this text

[Assistant] I'm worried about the quality of this product because it's dirt cheap.


[User] Please transcribe this text

[Assistant] I'm worried about the quality of this product because it's dirt cheap.


[User] Please transcribe this text

[Assistant] I'm worried about the quality of this product because it's dirt cheap.


[User] Please transcribe this text

[Assistant] Oh, my god. All my efforts, have gone down the drain.


[User] Please transcribe this text

[Assistant] Oh, my god. All my efforts have gone down the drain.


[User] Please transcribe this text

[Assistant] Oh, my god. All my efforts have gone down the drain.


[User] Please transcribe this text

[Assistant] Oh, my god. All my efforts have gone down the drain.


[User] Please transcribe this text

[Assistant] Do me the favor to recall that I told you so, long ago.


[User] Please transcribe this text

[Assistant] Do me the favor to recall that I told you so, long ago.


[User] Please transcribe this text

[Assistant] Do me the favor to recall that I told you so, long ago.


[User] Please transcribe this text

[Assistant] Do me the favor to recall that I told you so, long ago.


[User] Please transcribe this text

[Assistant] Unfortunately, there is nothing we can do to improve matters.


[User] Please transcribe this text

[Assistant] Unfortunately, there is nothing we can do to improve matters.


[User] Please transcribe this text

[Assistant] Unfortunately, there is nothing we can do to improve matters.


[User] Please transcribe this text

[Assistant] Unfortunately, there is nothing we can do to improve matters.


[User] Please transcribe this text

[Assistant] It's probably good for you to get some criticism now and then.


[User] Please transcribe this text

[Assistant] It's probably good for you to get some criticism now and then.


[User] Please transcribe this text

[Assistant] It's probably good for you to get some criticism now and then.


[User] Please transcribe this text

[Assistant] It's probably good for you to get some criticism now and then.


[User] Please transcribe this text

[Assistant] Unit price seems fair enough, but we, re-hoping for a higher discount.


[User] Please transcribe this text

[Assistant] Unit price seems fair enough, but we, re-hoping for a higher discount.


[User] Please transcribe this text

[Assistant] Unit price seems fair enough, but we, re-hoping for a higher discount


[User] Please transcribe this text

[Assistant] Unit price seems fair enough, but we, re-hoping for a higher discount


[User] Please transcribe this text

[Assistant] My vacation plans went up in smoke when a crisis arose in the office.


[User] Please transcribe this text

[Assistant] My vacation plans went up in smoke when a crisis arose in the office.


[User] Please transcribe this text

[Assistant] My vacation plans went up in smoke when a crisis arose in the office.


[User] Please transcribe this text

[Assistant] My vacation plans went up in smoke when a crisis arose in the office.


[User] Please transcribe this text

[Assistant] We should probably hit the road. It's going to take us two hours to get home


[User] Please transcribe this text

[Assistant] We should probably hit the road. It's going to take us two hours to get home


[User] Please transcribe this text

[Assistant] We should probably hit the road. It's going to take us two hours to get home


[User] Please transcribe this text

[Assistant] We should probably hit the road. It's going to take us two hours to get home


[User] Please transcribe this text

[Assistant] He pulled some strings and managed to get us front row seats for the concert.


[User] Please transcribe this text

[Assistant] He pulled some strings and managed to get us front row seats for the concert.


[User] Please transcribe this text

[Assistant] He pulled some strings and managed to get us front row seats for the concert.


[User] Please transcribe this text

[Assistant] He pulled some strings and managed to get us front row seats for the concert.


[User] Please transcribe this text

[Assistant] She is such a stick in the mud. She never wants to try anything new.


[User] Please transcribe this text

[Assistant] She is such a stick in the mud. She never wants to try anything new.


[User] Please transcribe this text

[Assistant] She is such a stick in the mud. She never wants to try anything new.


[User] Please transcribe this text

[Assistant] She is such a stick in the mud. She never wants to try anything new.


[User] Please transcribe this text

[Assistant] This car is a real lemon. It has broken down four times.


[User] Please transcribe this text

[Assistant] This car is a real lemon. It has broken down four times.


[User] Please transcribe this text

[Assistant] This car is a real lemon. It has broken down four times.


[User] Please transcribe this text

[Assistant] This car is a real lemon. It has broken down four times.


[User] Please transcribe this text

[Assistant] The idea of glasses being a fashion item has been slow to catch on.


[User] Please transcribe this text

[Assistant] The idea of glasses being a fashion item has been slow to catch on.


[User] Please transcribe this text

[Assistant] The idea of glasses being a fashion item has been slow to catch on.


[User] Please transcribe this text

[Assistant] The idea of glasses being a fashion item has been slow to catch on.


[User] Please transcribe this text

[Assistant] Tomorrow is my day off, so you'd better come after tomorrow.


[User] Please transcribe this text

[Assistant] Tomorrow is my day off, so you'd better come after tomorrow.


[User] Please transcribe this text

[Assistant] Tomorrow is my day off, so you'd better come after tomorrow.


[User] Please transcribe this text

[Assistant] Tomorrow is my day off, so you'd better come after tomorrow.


[User] Please transcribe this text

[Assistant] Most people go through the same routine, day in and day out.


[User] Please transcribe this text

[Assistant] Most people go through the same routine, day in and day out.


[User] Please transcribe this text

[Assistant] Most people go through the same routine, day in and day out.


[User] Please transcribe this text

[Assistant] Most people go through the same routine, day in and day out.


[User] Please transcribe this text

[Assistant] I'm dead tired. I'm looking forward to staying in bed.


[User] Please transcribe this text

[Assistant] I'm dead tired. I'm looking forward to staying in bed.


[User] Please transcribe this text

[Assistant] I'm dead tired. I'm looking forward to staying in bed.


[User] Please transcribe this text

[Assistant] I'm dead tired. I'm looking forward to staying in bed.


[User] Please transcribe this text

[Assistant] I'm worried about the quality of this product because it's dirt cheap.


[User] Please transcribe this text

[Assistant] I'm worried about the quality of this product because it's dirt cheap.


[User] Please transcribe this text

[Assistant] I'm worried about the quality of this product because it's dirt cheap.


[User] Please transcribe this text

[Assistant] I'm worried about the quality of this product because it's dirt cheap.


[User] Please transcribe this text

[Assistant] Oh, my god. All my efforts have gone down the drain.


[User] Please transcribe this text

[Assistant] Oh, my god. All my efforts have gone down the drain.


[User] Please transcribe this text

[Assistant] Oh, my god. All my efforts have gone down the drain.


[User] Please transcribe this text

[Assistant] Oh, my god. All my efforts have gone down the drain.


[User] Please transcribe this text

[Assistant] Do me the favor to recall that I told you so, long ago.


[User] Please transcribe this text

[Assistant] Do me the favor to recall that I told you so, long ago.


[User] Please transcribe this text

[Assistant] Do me the favor to recall that I told you so, long ago.


[User] Please transcribe this text

[Assistant] Do me the favor to recall that I told you so, long ago.


[User] Please transcribe this text

[Assistant] Unfortunately, there is nothing we can do to improve matters.


[User] Please transcribe this text

[Assistant] Unfortunately, there is nothing we can do to improve matters.


[User] Please transcribe this text

[Assistant] Unfortunately, there is nothing we can do to improve matters.


[User] Please transcribe this text

[Assistant] Unfortunately, there is nothing we can do to improve matters.


[User] Please transcribe this text

[Assistant] It's probably good for you to get some criticism now and then.


[User] Please transcribe this text

[Assistant] It's probably good for you to get some criticism now and then.


[User] Please transcribe this text

[Assistant] It's probably good for you to get some criticism now and then.


[User] Please transcribe this text

[Assistant] It's probably good for you to get some criticism now and then.


[User] Please transcribe this text

[Assistant] My vacation plans went up in smoke when a crisis arose in the office.


[User] Please transcribe this text

[Assistant] My vacation plans went up in smoke when a crisis arose in the office.


[User] Please transcribe this text

[Assistant] My vacation plans went up in smoke when a crisis arose in the office.


[User] Please transcribe this text

[Assistant] My vacation plans went up in smoke when a crisis arose in the office.


[User] Please transcribe this text

[Assistant] Unit price seems fair enough, but we, re-hoping for a higher discount


[User] Please transcribe this text

[Assistant] Unit price seems fair enough, but we, re-hoping for a higher discount


[User] Please transcribe this text

[Assistant] Unit price seems fair enough, but we, re-hoping for a higher discount


[User] Please transcribe this text

[Assistant] Unit price seems fair enough, but we, re-hoping for a higher discount


[User] Please transcribe this text

[Assistant] This car is a real lemon. It has broken down four times.


[User] Please transcribe this text

[Assistant] This car is a real lemon. It has broken down four times.


[User] Please transcribe this text

[Assistant] This car is a real lemon. It has broken down four times.


[User] Please transcribe this text

[Assistant] This car is a real lemon. It has broken down four times.


[User] Please transcribe this text

[Assistant] We should probably hit the road. It's going to take us two hours to get home


[User] Please transcribe this text

[Assistant] We should probably hit the road. It's going to take us two hours to get home


[User] Please transcribe this text

[Assistant] We should probably hit the road. It's going to take us two hours to get home


[User] Please transcribe this text

[Assistant] We should probably hit the road. It's going to take us two hours to get home


[User] Please transcribe this text

[Assistant] He pulled some strings and managed to get us front row seats for the concert.


[User] Please transcribe this text

[Assistant] He pulled some strings and managed to get us front row seats for the concert.


[User] Please transcribe this text

[Assistant] He pulled some strings and managed to get us front row seats for the concert.


[User] Please transcribe this text

[Assistant] He pulled some strings and managed to get us front row seats for the concert.


[User] Please transcribe this text

[Assistant] She is such a stick in the mud. She never wants to try anything new.


[User] Please transcribe this text

[Assistant] She is such a stick in the mud. She never wants to try anything new.


[User] Please transcribe this text

[Assistant] She is such a stick in the mud. She never wants to try anything new.


[User] Please transcribe this text

[Assistant] She is such a stick in the mud. She never wants to try anything new.


[User] Please transcribe this text

[Assistant] Welcome to this video in learning Elasticsearch 5.0 entitled Aggregation-Based Analytics.


[User] Please transcribe this text

[Assistant] The Elasticsearch aggregation framework allows for the use of search to build complex summaries of data.


[User] Please transcribe this text

[Assistant] Essentially, aggregations build analytics information over a group of documents based on a given query.


[User] Please transcribe this text

[Assistant] Elasticsearch provides a wide range of aggregations.


[User] Please transcribe this text

[Assistant] In this video, we'll look at bucket and metrics aggregations.


[User] Please transcribe this text

[Assistant] Metrics aggregations calculate the average numeric value on a numeric field within aggregated documents. This is known as a single value metrics aggregation because the calculations are done across one value in the document.


[User] Please transcribe this text

[Assistant] Here is a metrics aggregation where we find the average book count by using the average or AVG parameter. Also note that right after the ags parameter, we provided a name for the aggregation. In this case, it was average book count.


[User] Please transcribe this text

[Assistant] The size field with the value of zero is used to keep Elasticsearch from listing all the documents in the results.


[User] Please transcribe this text

[Assistant] In aggregations this is quite useful because, in some instances, a field may be missing a value. The default behavior is to skip all fields with no values. However, the missing parameter allows you to assign a default value to all fields without values.


[User] Please transcribe this text

[Assistant] So, for example, let's say you wanted to assume that an author must have at least one book.


[User] Please transcribe this text

[Assistant] Now, any document without a value will receive the value of 1.


[User] Please transcribe this text

[Assistant] Though there are quite a few metrics aggregations, for the purpose of this course, we will focus on cardinality, extended stats, and geoaggregations.


[User] Please transcribe this text

[Assistant] Cardinality aggregation is a single value matrix aggregation that allows you to aggregate distinct values.


[User] Please transcribe this text

[Assistant] Going back to our example, let's say we wanted to count the number of authors in our index of the type book.


[User] Please transcribe this text

[Assistant] What happens here is that Elasticsearch counts the occurrence of each name once. So if the name Michael Smith appears three times, Elasticsearch only counts it once.


[User] Please transcribe this text

[Assistant] Hence, distinct value. The extended stats aggregation is a multi-value metrics aggregation. More specifically, the sum of squares, variance, standard deviation, and standard deviation bounds are calculated over the values extracted from numeric fields in a given document.


[User] Please transcribe this text

[Assistant] This is an extended stats aggregation using our book example.


[User] Please transcribe this text

[Assistant] The results yield count, minimum, max, average, sum, sum of squares, variance, standard deviation, and


[User] Please transcribe this text

[Assistant] Note that the missing parameter also works with extended stat aggregation. Geo aggregations. Each time a person visits a website, for example,


[User] Please transcribe this text

[Assistant] Longitude and latitude data can be extracted from their IP addresses.


[User] Please transcribe this text

[Assistant] So one obvious implementation of geo bounds would be to evaluate weblogs to say determine if visitors are highly concentrated in a given area. This is an example of a geo aggregation query. One thing to note here per the mappings is that the field should be pin.


[User] Please transcribe this text

[Assistant] dot location, not just the location field. And we'll see that in the implementation video.


[User] Please transcribe this text

[Assistant] The results yield the long and lat, that's the longitudinal latitude for the top left corner.


[User] Please transcribe this text

[Assistant] Bucket aggregations group search results in buckets. One of the most common uses of bucket aggregations is for the generation of histograms.


[User] Please transcribe this text

[Assistant] A histogram, as you may know, is a distribution of numerical data represented in graphical form.


[User] Please transcribe this text

[Assistant] We will cover two types of bucket aggregations here. We will look at the date histograms and the histograms.


[User] Please transcribe this text

[Assistant] A date histogram aggregation in Elasticsearch creates a distribution of date values that are grouped into predetermined buckets. This is an example of the date histogram aggregation. Here you see we have the ags parameter.


[User] Please transcribe this text

[Assistant] And then we have pub over time, that's the name of the aggregation and then we have date histogram.


[User] Please transcribe this text

[Assistant] Because we have to actually tell which type of aggregation we want to run. So here we're running the date underscore histogram.


[User] Please transcribe this text

[Assistant] And then we identify the field that we want to run our analysis across. In this case, the field will be pub date. That's the publication date. And then you have to state the intervals. In this case, the interval is month. So it will be done in monthly intervals.


[User] Please transcribe this text

[Assistant] Like date histogram aggregation, histogram aggregations are also multi-bucket aggregations. But histogram aggregations can be applied to numerical values in specified fields from querying a set of documents.


[User] Please transcribe this text

[Assistant] Note that numerical values are rounded down to their nearest bucket and that fixed interval buckets are created over the generated values.


[User] Please transcribe this text

[Assistant] This is an example of a histogram aggregation query. Here you see again we have the name


[User] Please transcribe this text

[Assistant] After the ags parameter and here we named it book prices. Then of course histogram because we have to say which aggregation we want to run. And then we identify the field. Here the field is price. The intervals that we wanted to be bucketed by. And finally, mendoc count. We set the mendoc count to one.


[User] Please transcribe this text

[Assistant] So that if a given bucket has zero documents, it will not appear in the histogram. This is important for aesthetic purposes.


[User] Please transcribe this text

[Assistant] As you've seen, a histogram is a continuous line of bars, higher, lower, or equal height. It would ruin the aesthetics if you have blank spots in between where bars should be.


[User] Please transcribe this text

[Assistant] So, min.count set to 1 allows you to avoid having that show up in your histogram.


[User] Please transcribe this text

[Assistant] Which is the price level. For example the bucket size. 5, 10, 15. Because we use the interval of 5 here.


[User] Please transcribe this text

[Assistant] Welcome to this section in Learning Elasticsearch 5.0, entitled Power Your Searches with DSL.


[User] Please transcribe this text

[Assistant] In this section, we start with an introduction to DSL. That's the query language for Elasticsearch.


[User] Please transcribe this text

[Assistant] We then move into understanding DSL and follow that up with the hot topic of analytics. More specifically, we look at the aggregation-based analytics framework that's baked into Elasticsearch. In this video, we go through an introduction to DSL. That's the domain-specific language. We will start by defining DSL


[User] Please transcribe this text

[Assistant] We close things out by going into two specific types of DSL query categories and some associated subtypes in each. What is DSL?


[User] Please transcribe this text

[Assistant] DSL is an ultra-powerful JSON-based language that lets you execute queries in Elasticsearch. DSL consists of two clauses. The first clause is a leaf query.


[User] Please transcribe this text

[Assistant] Contained in a leaf query is a match, a term, or a range query which searches for a given value in a given field. Next you have a compound query.


[User] Please transcribe this text

[Assistant] A compound query essentially combines leaf query clauses and other compound query clauses to search for desired information. For the sake of brevity,


[User] Please transcribe this text

[Assistant] Three general types of queries will be covered in this video.


[User] Please transcribe this text

[Assistant] However, as this course progresses, we will handle a wide range of query types. Accordingly, we'll be looking at match all, full text, and term level queries. Match all queries are the most basic form of queries. Match all queries return all content with a score of 1. We'll look at scores soon. This is an example of a match all query. Full text queries


[User] Please transcribe this text

[Assistant] Are used for searching bodies of text, e.g. pages of books, descriptions, etc.


[User] Please transcribe this text

[Assistant] There are two types of full text queries we're looking at. The match query and the multi-match query. The match query matches text with the value of fields. Here's an example of a match query. In this query, what you're doing is you're looking for a match for


[User] Please transcribe this text

[Assistant] Multi-match queries do the same thing as match queries except they match text with more than one field. For example.


[User] Please transcribe this text

[Assistant] Notice the fields section where you list the different fields you would like to search. So here.


[User] Please transcribe this text

[Assistant] You want to search city and state fields.


[User] Please transcribe this text

[Assistant] Term level queries are designed to be used with structured data. So for numbers, dates, etc. The three types of term level queries we're going to look at are the Exist, Type, and Range.


[User] Please transcribe this text

[Assistant] The Exist query returns documents with a minimum of one non-null in the original document field. Here's an example of an Exist query.


[User] Please transcribe this text

[Assistant] Type query matches documents based on mapping type. So for example, if you want to search all documents in the books index that were of the type book, then this will be the query you will run.


[User] Please transcribe this text

[Assistant] Range queries find objects which have a value that exists.


[User] Please transcribe this text

[Assistant] Between a range of values. Range queries are very important and often used.


[User] Please transcribe this text

[Assistant] So there's the greater than or equal to, greater than, less than or equal to, or less than. This is an example of a range query where we're actually searching a field name rating and we're looking for values greater than five.


[User] Please transcribe this text

[Assistant] There are also compound queries, joining queries, geo queries, and many more. We'll dive deeper into queries in the upcoming videos. And that concludes this video. Up next, we will go into understanding DSL.


[User] Please transcribe this text

[Assistant] Hi everybody. Uhm, I hope that you are all doing well.


[User] Please transcribe this text

[Assistant] I will have exams back for you on Monday.


[User] Please transcribe this text

[Assistant] And just so you know, uh, if you look at the schedule, it says there is a, uhm, inquisitive assignment next week, and that inquisitive assignment is available and posted. It's all about MHC related things. Uhm, it's next Wednesday that it's, uh, due, but it's there if you want to start thinking about it.


[User] Please transcribe this text

[Assistant] Uh, today, we are going to be talking about MHD structure and function.


[User] Please transcribe this text

[Assistant] If you recall, uh, I told you about the human MHC system.


[User] Please transcribe this text

[Assistant] On Wednesday, which is known as the HLA locus. So HLA is a specific term for MHC in humans.


[User] Please transcribe this text

[Assistant] We talked about the genes being part of a very long region of the chromosome. The genes in the class 1 region encode class 1 MHC.


[User] Please transcribe this text

[Assistant] We talked about the fact that these are the most polymorphic genes in the human genome.


[User] Please transcribe this text

[Assistant] Which means that there are lots of versions of HLA-A among the human population. Lots of versions of HLA-B, lots of versions of HLA-C, etc.


[User] Please transcribe this text

[Assistant] And we name all of those versions with different numbers.


[User] Please transcribe this text

[Assistant] So I might have HLA A1 and A7 on my two versions of chromosome 6.


[User] Please transcribe this text

[Assistant] And Carney might have HLA A2 and A15.


[User] Please transcribe this text

[Assistant] And we're all gonna have different versions of them and we indicate those different versions with numbers.


[User] Please transcribe this text

[Assistant] The human MHC was really first described.


[User] Please transcribe this text

[Assistant] By uhm, people who were looking at weird antigens on the surface of


[User] Please transcribe this text

[Assistant] Uhm, some cells in pregnant women.


[User] Please transcribe this text

[Assistant] So it was just like this weird antigen that was on leukocytes. Human leukocyte antigen. They didn't know anything about it or what it did. They just, that's what they called it.


[User] Please transcribe this text

[Assistant] Uhm, the mouse MHC was described in experiments using skin grafting.


[User] Please transcribe this text

[Assistant] And you can see, uh, some of the details of the experiments, uhm, here. So we have a mouse of one strain. Uhm, it is the orange mouse.


[User] Please transcribe this text

[Assistant] We have another mouse of another strain, which is the yellow mouse.


[User] Please transcribe this text

[Assistant] Uhm, and in some of the experiments, we would cross these two mice and get an F1 progeny. Uhm, so you can see that


[User] Please transcribe this text

[Assistant] And at every chromosome, we've got one orange chromosome coming from the orange parent who was inbred.


[User] Please transcribe this text

[Assistant] Uhm, at the beginning, and one chromosome coming from the yellow parent who was inbred.


[User] Please transcribe this text

[Assistant] So we have this sort of half orange, half yellow progeny.


[User] Please transcribe this text

[Assistant] People started doing some experiments here. They would think about donors and they would think about recipients.


[User] Please transcribe this text

[Assistant] And what they saw was that one parent, say the orange parent, could donate to other orange mice, but could not donate to mice of another strain, uh, the yellow mice.


[User] Please transcribe this text

[Assistant] And that orange parent could also donate to the recipient. Who, oh my gosh, also has orange.


[User] Please transcribe this text

[Assistant] Uhm, same thing, the yellow parent could donate to yellow parent, could not donate to orange parent, who doesn't have uh, yellow.


[User] Please transcribe this text

[Assistant] Uhm, we can also donate to the recipient and you can see that the progeny who has both yellow and orange cannot donate to either parent because in either case there's some kind of mismatch. Uhm, here.


[User] Please transcribe this text

[Assistant] There's, the mismatch is the yellow half, here the mismatch is the orange half, uhm, but they can, uh, donate to other progeny. And so, they dig more and more and more complicated, uhm,


[User] Please transcribe this text

[Assistant] Crosses and skin grafting experiments to try to find out information about the genes that were governing transplant rejection.


[User] Please transcribe this text

[Assistant] I will also tell you, sometimes students look at this and they take this to be the answer to all transplantation. And they're like, that's awesome. Next time I need a kidney, I just have to call my mom.


[User] Please transcribe this text

[Assistant] Uhm, please note that these examples are showing the situation in inbred mice. Uhm, the fact that humans are not inbred.


[User] Please transcribe this text

[Assistant] Complicates this genetics even further. Uhm, so do not imagine that this, that this means that all progeny can get all transplants from all their parents because that's not the case in non-inbred species.


[User] Please transcribe this text

[Assistant] And the scientists who did these types of experiments


[User] Please transcribe this text

[Assistant] I came up with some genes that were particularly important.


[User] Please transcribe this text

[Assistant] For the success of these skin grafts.


[User] Please transcribe this text

[Assistant] They found a really long region of the chromosome.


[User] Please transcribe this text

[Assistant] They made up a name for that region of the chromosome. Just like the people who were doing the human experiments said, this is the human leukocyte antigen part of the chromosome.


[User] Please transcribe this text

[Assistant] Uhm, the folks who were doing the mouse experiments called this the H2 locus. And so H2 means mouse MHC.


[User] Please transcribe this text

[Assistant] Uh, genes don't line up quite as perfectly as you'd like them to, but we do still have a class 1, class 2, and class 3 regions that contain the same general types of genes. And so in mouse,


[User] Please transcribe this text

[Assistant] One thing that you can notice here is when I told you about the human genes.


[User] Please transcribe this text

[Assistant] I said the human class ones, I always remember A, B, and C because they have one letter. And I remember D, P, D, Q, D, R because they have two letters.


[User] Please transcribe this text

[Assistant] In mouse, the class ones also have one letter, K, D, or L.


[User] Please transcribe this text

[Assistant] And the class twos also have two letters, IA or IE.


[User] Please transcribe this text

[Assistant] Uhm, so that sort of holds up for us.


[User] Please transcribe this text

[Assistant] You can see that because things are annoying, technically K is in this spot over here, away from D and L. I think whenever I draw it for you, I put K with D and L because...


[User] Please transcribe this text

[Assistant] I don't want to deal with that business. Uhm, and we've got the IAA and IE molecules here.


[User] Please transcribe this text

[Assistant] The place we're thinking about


[User] Please transcribe this text

[Assistant] Mouse MHC gets a little bit tricky.


[User] Please transcribe this text

[Assistant] I defined them with numbers. I said A1 versus A7.


[User] Please transcribe this text

[Assistant] Well, these people who were doing these mouse crossing experiments...


[User] Please transcribe this text

[Assistant] Use an old-fashioned weird way of doing it, not numbers.


[User] Please transcribe this text

[Assistant] They instead talked about, uhm, the haplotypes of their, uhm, mouse strains.


[User] Please transcribe this text

[Assistant] Uhm, I'm going to sort of draw some of this out to, uhm, help you understand. So,


[User] Please transcribe this text

[Assistant] Some of these investigators, uhm, took a mouse called a Belbse mouse, which is the standard kind of white lab mouse. It's up in the, uhm, top corner. And they looked at


[User] Please transcribe this text

[Assistant] The genes in MHC on the chromadomes from that mouse.


[User] Please transcribe this text

[Assistant] So there are my chromosomes. There are the genes on the two chromosomes from this mouse. This is an inbred mouse. So.


[User] Please transcribe this text

[Assistant] It's two versions of IA are gonna be the same. It's two versions of IE are gonna be the same.


[User] Please transcribe this text

[Assistant] Uh, et cetera. In fact, often times when we're thinking about an inbred mouse, we just draw one chromosome. Because we know in our head there's two copies of that one chromosome.


[User] Please transcribe this text

[Assistant] But I will say that sometimes people get confused on that, so there really are two. Uhm, and they said, okay, there is a version of K that this mouse has.


[User] Please transcribe this text

[Assistant] Uhm, as K of D. So we're gonna use this superscript, small d.


[User] Please transcribe this text

[Assistant] We're actually going to call all of them the D version. So D of D, L of D, IE of D, and IA of D.


[User] Please transcribe this text

[Assistant] Uhm, and so we use these little letter subscripts, uhm, or sorry, superscripts to indicate, uhm, which versions these mice have.


[User] Please transcribe this text

[Assistant] And what that means is that if, when I see this,


[User] Please transcribe this text

[Assistant] I know that if I were to expand out and draw the whole chromosome,


[User] Please transcribe this text

[Assistant] I'd put a little D next to every single one of the genes. It's the D version in every single one. So if you are of the H2D haplotype.


[User] Please transcribe this text

[Assistant] That's a shorthand to tell you it should expand to looking like this.


[User] Please transcribe this text

[Assistant] So when I, when I see this information, that tells me.


[User] Please transcribe this text

[Assistant] And just sort of for clarity's sake, some students see this and they get it immediately. Some students don't totally get it even looking at this. So I'm going to show you the other thing that helps some people.


[User] Please transcribe this text

[Assistant] Is we can imagine what would happen if I went to New York City this weekend. Might happen, dunno. And I caught a mouse running around the subway. And so that mouse...


[User] Please transcribe this text

[Assistant] That would not be an inbred lab mouse, that would be an outbred mouse. Kind of like humans are an outbred population. That mouse would still have...


[User] Please transcribe this text

[Assistant] But it wouldn't have sort of a version that somebody defined necessarily in the lab. So it might have...


[User] Please transcribe this text

[Assistant] On this chromosome, the same IA version as a black sixth mouse. So it might have IA of B. But it might have IA of S. Some other version on its other chromosome. It might have IE of K. And then over here it could have IE of B. Could have K of D.


[User] Please transcribe this text

[Assistant] Maybe K of A. I'm looking at some of the options up there. H. Uh, oh, there's a T.


[User] Please transcribe this text

[Assistant] Here I would know, oh this IA of B, it's the same version of IA that we had in the black six mouse.


[User] Please transcribe this text

[Assistant] Uhm, I couldn't come up with some shorthand name, like I did calling this whole beast to, or the B6 locus.


[User] Please transcribe this text

[Assistant] I'm using these little superscript letters, uhm, to indicate the versions of the alleles.


[User] Please transcribe this text

[Assistant] As you look at old exams and practice problems, you'll see a lot of this mouse nomenclature and you'll see it as we go forward with some things about T cells, we'll be sort of...


[User] Please transcribe this text

[Assistant] Having to think about the mouse, uh, MHCs, so that's why it's important that we understand this nomenclature.


[User] Please transcribe this text

[Assistant] Uhm, so for the rest of the time today, I want to talk a bit about aspects of MHC function.


[User] Please transcribe this text

[Assistant] And specifically I want to talk less about the genes today. We talked about the genes, uhm,


[User] Please transcribe this text

[Assistant] A second ago when we talked about the genes on Wednesday, now we're really gonna be talking about what does this protein look like? What is the structure of the MHC protein?


[User] Please transcribe this text

[Assistant] And how do some parts of that structure relate to what we know about its function?


[User] Please transcribe this text

[Assistant] So the process of how we get the peptide broken down and put onto the MHC molecule is going to be the process that we talk about on Monday next week. So today we're really thinking about what is the structure of this MHC molecule actually look like and how is that related to some aspects of its function.


[User] Please transcribe this text

[Assistant] Uhm, so I have to give you a quick biochem refresher. Be ready.


[User] Please transcribe this text

[Assistant] When thinking about proteins, there are a couple of things you should remember. Proteins are made up of amino acids.


[User] Please transcribe this text

[Assistant] Remember with our amino acids, we have this amino or N terminus.


[User] Please transcribe this text

[Assistant] Uhm, it is usually positively charged.


[User] Please transcribe this text

[Assistant] We also have this carboxy terminus that is usually negatively charged. Uhm, the N terminus is the beginning of the protein. The C terminus is the end.


[User] Please transcribe this text

[Assistant] And basically what we, and we actually have an N and a C terminus on every amino acid. And when we join them together, we get this nice linkage. And so you can see here's NCC and then NCC and you can have all these NCC's going on in a line, uh, really repetitively.


[User] Please transcribe this text

[Assistant] Uhm, I am going to refer- to mention those as either the peptide backbone or the main chain atoms.


[User] Please transcribe this text

[Assistant] Uhm, and so, if I talk about the peptide backbone or the main chain, I just talk about this NCC, NCC, NCC, NCC, NCC that goes on forever.


[User] Please transcribe this text

[Assistant] Each, and so you can see that at the bottom. All these NCCs.


[User] Please transcribe this text

[Assistant] Each amino acid differs from each


[User] Please transcribe this text

[Assistant] What it has going on here with its chemistry, which is known as the R group. So our, uhm, 20 amino acids each have 20 different R groups.


[User] Please transcribe this text

[Assistant] Uhm, what you can notice is that the R groups are different sizes. They are different shapes. They're different charges.


[User] Please transcribe this text

[Assistant] And so I'm also going to make some references to the R groups, uhm, and so this is just a reminder of what R groups are.


[User] Please transcribe this text

[Assistant] Uhm, the two I often use as examples are lysine, which has this long skinny one with a charge at the end.


[User] Please transcribe this text

[Assistant] Uhm, and the other one I like to use is either phenylalanine or tryptophan, which has this ring. Those are kind of my frequent examples.


[User] Please transcribe this text

[Assistant] Uhm, but you can see lots of different shapes, lots of different charges, lots of different sizes.


[User] Please transcribe this text

[Assistant] Alright, so in talking about the MHC proteins, we already have to start thinking a little bit about the divisions in MHC types that I already have told you about when thinking about the genetics, which I already told you about on the chalkboard here.


[User] Please transcribe this text

[Assistant] And that is because we have two different types of MHC proteins that are structured in two different ways.


[User] Please transcribe this text

[Assistant] They are the MHC class 1 proteins and the MHC class 2 proteins. We already have seen that these are two different types because of, we saw that their genes were in two different regions on the chromosome.


[User] Please transcribe this text

[Assistant] The two proteins are structured in different ways. And so when we talk about MHC, we are going to specify if we're talking about MHC class 1 and its structure or MHC class 2 and its structure. And so we're first going to kind of talk about all the details of MHC class 1.


[User] Please transcribe this text

[Assistant] And then we'll talk about all the details of MHC Class 2.


[User] Please transcribe this text

[Assistant] I will tell you, say two things. One, uhm, MHC class one is my old favorite. So again, with examples I'll probably usually default to class one because that's the one I think about the most often.


[User] Please transcribe this text

[Assistant] Uhm, to this lecture always freaks me out, uhm, because the first time I was a TA as a grad student, I had to teach something about this and I ended up drawing.


[User] Please transcribe this text

[Assistant] One of the most inappropriate drawings on the, I was doing a drawing on a chalkboard like this and not looking behind, looking at what I was doing and I drew a super inappropriate drawing.


[User] Please transcribe this text

[Assistant] And so I, the whole rest of the time today, I'm gonna be like super on edge while I'm drawing about like, make sure that I'm drawing something okay. Uhm, so let's hope no bad drawings today.


[User] Please transcribe this text

[Assistant] Uhm, okay, so we're first going to look at, uhm, MHC class 1's structure.


[User] Please transcribe this text

[Assistant] You can see some of the important features of the class 1 structure just from this image. So one thing to notice is that the MHC class 1 molecule only has one transmembrane domain.


[User] Please transcribe this text

[Assistant] Uhm, which is going to differ from class 2 that has those two transmembrane domains.


[User] Please transcribe this text

[Assistant] You can also see that class 1 is largely made up of this one protein that has these three domains. They're all shown in yellow. So we've got this protein shown like this.


[User] Please transcribe this text

[Assistant] Uhm, that one protein itself makes up the peptide binding pocket.


[User] Please transcribe this text

[Assistant] And that MHC class 1 molecule is paired with this other protein. Uhm, you can see


[User] Please transcribe this text

[Assistant] Some example, another sort of set of examples of this here. So uhm, we've got our one protein that was shown in yellow on the other slide, also being shown in yellow here. And that is known as the MHC class 1 heavy chain, or sometimes also referred to as the alpha chain. It has three domains, alpha 1, alpha 2, and alpha 3.


[User] Please transcribe this text

[Assistant] Uhm, you can see the alpha-3 is a pretty standard immunoglobulin-like domain. Uhm, alpha-1 and alpha-2 are up here at the top. They're not shown as standard immunoglobulin domains.


[User] Please transcribe this text

[Assistant] Alpha 1 and Alpha 2 make up the peptide binding cleft.


[User] Please transcribe this text

[Assistant] Alpha 3 has the transmembrane domain.


[User] Please transcribe this text

[Assistant] Uhm, and it is more of a structural support of that peptide binding cleft.


[User] Please transcribe this text

[Assistant] You can see the peptide, which is shown here as like a pink dot, uhm, is right in between that alpha 1, alpha 2. Sort of, we're looking along the line of the peptide.


[User] Please transcribe this text

[Assistant] Uhm, and MHC class 1 pairs with a partner protein.


[User] Please transcribe this text

[Assistant] That partner protein is shown here, uhm, and it is known as beta 2m or beta 2 microglobulin.


[User] Please transcribe this text

[Assistant] To the MHC class 1 heavy chain, nor does it have a transmembrane domain.


[User] Please transcribe this text

[Assistant] Uhm, so it is basically a free protein that comes in and stabilizes this entire structure. It can actually come on and off.


[User] Please transcribe this text

[Assistant] Uhm, and so it's, so if you were, say, drawing MHT class 1, it would be important that Beta 2M was present.


[User] Please transcribe this text

[Assistant] That it was not connected to the heavy chain and that it was not connected to have a transmembrane domain.


[User] Please transcribe this text

[Assistant] Uhm, you don't get a fully folded class one until you have the class one heavy chain beta 2m and a peptide.


[User] Please transcribe this text

[Assistant] Uhm, so the heavy chain is all of this. And then this is beta 2m.


[User] Please transcribe this text

[Assistant] Same thing, heavy chain is all of the yellow here. Beta 2M is the


[User] Please transcribe this text

[Assistant] Now we're going to sort of pivot the MHC molecule, but first I think there's a question.


[User] Please transcribe this text

[Assistant] You can think of it as just stabilizing the structure. Uhm, the, the whole structure is not folded correctly and sort of in its final form until beta 2m is there.


[User] Please transcribe this text

[Assistant] Uhm, one thing I forgot to mention about beta 2M, uhm, is that beta 2M is a conserved protein. So we talked about the difference, all of the different versions of MHC class 1 that there are, how we all have different versions of MHC class 1. They all use identical beta 2Ms.


[User] Please transcribe this text

[Assistant] So I have two different HLA A's, two HLA B's, two HLA C's on my cell. They're all pairing with this same conserved beta 2m protein.


[User] Please transcribe this text

[Assistant] Basically the same one. So like, you have an identical beta 2M to me.


[User] Please transcribe this text

[Assistant] And, and so I mean, it's, my cell's making many copies of it. They're not all using, binding with the same copy, but it's the same, it's the same protein, just copies of it.


[User] Please transcribe this text

[Assistant] Uhm, so right now we're sort of looking at the MHC molecule from the side, like we're standing in the membrane looking at the MHC molecule.


[User] Please transcribe this text

[Assistant] And so we can see the side of it, we can see the peptide from the side. Uhm, but we're going to kind of pivot on the next slide as if we were the T cell. And we're going to be looking down.


[User] Please transcribe this text

[Assistant] At the MHC molecule. So we're going to be up here looking down to look at the peptide binding cleft.


[User] Please transcribe this text

[Assistant] In general, the peptide binding clefts have these really nice beta sheets that make almost like a little tray.


[User] Please transcribe this text

[Assistant] And then two alpha helices that make a little spot for the peptide. We've got our little tray. We've got our alpha helices making a little spot for the peptide.


[User] Please transcribe this text

[Assistant] But the MHC class 1 peptide binding cleft has some, uh, sort of unique features. So here we're looking now down.


[User] Please transcribe this text

[Assistant] At the peptide binding cleft. You can see our alpha helices.


[User] Please transcribe this text

[Assistant] Those alpha helices are part of that same heavy chain protein, um, and they make


[User] Please transcribe this text

[Assistant] This little pocket, this cleft for the peptide.


[User] Please transcribe this text

[Assistant] This image shows us one thing that is super important to know about the MHC class 1 binding class.


[User] Please transcribe this text

[Assistant] Don't know why I really like this figure. I know why I like this figure. But what I don't know is why-


[User] Please transcribe this text

[Assistant] They've stopped putting it in different editions of the textbook, and I have to use old editions. And I don't know why, because this is really important.


[User] Please transcribe this text

[Assistant] Uhm, so in this figure, the white is that MHC class 1 heavy chain. And the red is the peptide. And what you should notice is that


[User] Please transcribe this text

[Assistant] Is closed on the end of the peptide binding cleft. You can see the peptide is completely surrounded here.


[User] Please transcribe this text

[Assistant] What that means is that the MHT class 1 molecule is kinda picky.


[User] Please transcribe this text

[Assistant] About the peptides. If there was a peptide that was crazy long, it wouldn't fit in there.


[User] Please transcribe this text

[Assistant] There's a limit to how big that peptide can be to fit in that MHC class 1 binding class.


[User] Please transcribe this text

[Assistant] Uhm, it's because the tips of these all the helices are so very close together. I feel like I should point that out because Casano just walked by, putting out the protein.


[User] Please transcribe this text

[Assistant] Uhm, so the tips of these come together really closely. The peptide can't like flap out in the middle. We are, we have this very constrained length.


[User] Please transcribe this text

[Assistant] So with MHC class 1 peptides,


[User] Please transcribe this text

[Assistant] Uhm, MHC class 1 can only accept peptides that are between 8 and 10 amino acids in length.


[User] Please transcribe this text

[Assistant] There is one other thing that is really important about that


[User] Please transcribe this text

[Assistant] So the closed ends, the 8 to 10 amino acids in length, and there's one other thing that's really important about the MHC class 1 peptide binding cleft, which is shown here. When we look at the peptide, and we look at the rest of the binding cleft,


[User] Please transcribe this text

[Assistant] We can look at the chemical interactions. Why doesn't Cassano walk by with this slide? Have some things he would really like.


[User] Please transcribe this text

[Assistant] Uhm, we can actually look at which atoms of the MHC molecule are interacting with the peptide. And when we do that, we find


[User] Please transcribe this text

[Assistant] That the MHC class 1 interacts with the R groups of the peptide.


[User] Please transcribe this text

[Assistant] I'm gonna now pivot us again, so we're gonna be looking at the MHC molecule from the side instead of from the top.


[User] Please transcribe this text

[Assistant] And so this is what we end up seeing with our MHC class 1 molecule and our peptide in the peptide binding pocket. So first of all, the


[User] Please transcribe this text

[Assistant] Peptide binding pocket has closed ends.


[User] Please transcribe this text

[Assistant] So we can only fit a peptide of a specific length. Uhm, it's not shown here.


[User] Please transcribe this text

[Assistant] But this part of the peptide binding cleft has a whole bunch of positive charges. This part has a whole bunch of negative charges. And as a result,


[User] Please transcribe this text

[Assistant] The, uh, amino terminus attracts really nicely to this end.


[User] Please transcribe this text

[Assistant] And the carboxy terminus attracts really nicely to this end. So we've got the right charges to make the peptide want to hang out.