If you lose connection with the atmosphere around you, you will die, isn't it? Unknowingly, your life is you versus the universe.  You can easily unmask it. In helplessness, many youngsters start thinking of taking the extreme step of ending their life. On this topic, many questions were asked. One of them is, many of my close friends are suicidal. What could I do to help them to get rid of this thought? And they don't want to do yoga. That's a rider, huh? So let's answer from this end. First of all, what is yoga? Well, right now unfortunately even in this country where it all began, people's idea of yoga is actually a rebound from the American coast.  No, I want you to understand what yoga means. Yoga means union. Union means... See, right now you're here, even you are breathing. Your friend also breathing, you think so? Okay. Of course, you're eating food, drinking water. There are many other levels of transactions, but at least these very physical things you understand. Without this transaction, you cannot exist, isn't it so? Hello?  You have pop-ups on your phone screen, which pop up and pop out. On this planet, you're just a pop-up and you will pop out. Yes. So you think you're an individual existence by yourself? No. If you lose connection with the atmosphere around you, you will die, isn't it?  Not just that, every cell, every subatomic particle in this body is in transaction. If the transaction doesn't happen, you can't exist for a moment.  Yoga means you consciously obliterate the boundaries of your individuality. Because if you do not consciously obliterate the boundaries of your individuality, then unknowingly, your life is you versus the universe. It's a very… you must listen to me on this one. You can take my advice on this. It's a bad competition to get into. You versus the universe, definitely you will feel like dying. When you face such a big competition, it's not worth living. It'll become like that. So how people normally handle it is, by obliterating it in unconscious ways a little bit, somebody falls in love with somebody, suddenly they've opened up the boundaries of their individuality a little bit to somebody. The English expression of falling in love is a good expression because something of you has to fall. You can't rise in love. You can't fly in love. You can't climb in love. You have to fall in love. That means… That means something of you has to be stripped. Something of you has to fall down. You have to make space for something else. Little bit of unconscious yoga you did. Does he still don't want to do yoga? So this longing to become… to break the boundaries, if it finds very physical basic expression, we call this sexuality. If it finds emotional expression, we call this a love affair. If it finds a mental expression, it gets labeled as ambition, conquest or simply shopping. If it finds a conscious expression, we call it yoga. In your life, what do you think? Whatever you do in your life, is it better to do consciously or unconsciously? What do you think? Consciously. So if you do a conscious obliteration of your boundaries, you understand you're unnecessarily building a psychological structure where you're feeling trapped. If you consciously obliterate this, this is called yoga. If you obliterate it physically, it's called sex. If you obliterate it emotionally, it's called love. If you try to obliterate it mentally, it's called achievement, conquest, ambition, fulfillment, victory, this kind of things. But all those things, how long do they last? Momentarily, because it's unconscious.   Because anything that you did not make, you have no right to destroy, isn't it? Did you make this life? Hello? Did you make this life or are you capable? No. Then how come?  You can easily unmask it. They must do yoga.


Welcome back everyone, we were in James chapter 1, so we will continue from where we stopped, we saw the section from verse 22 till verse 25 where we are encouraged to be doers of the word and not hear us only deceiving ourselves. So sometimes this section that James has written has been misused by religious minded believers or it has been neglected by the so called grace believing believers. So it really depends on how people have taken it, but what is it saying? It's just giving us a very practical and a very balanced understanding of how to approach the word of God. Yes, we are saved by grace, but we must also have the demonstration of the word of God through our lives which is why the writer James is telling the believers we doers of the word. Yes, we are saved by grace, we are saved by faith through grace, but we also have to live out the word of God. So ma'am, just the last portion on the previous lecture when you said double mindedness means that you make a decision. So this decision means the decision of following Christ. It's like that decision you are talking of or it is like basically even post you take a decision and then in your walk with Lord Jesus Christ. Your day to day decision making is also covered in that. So I'm just trying to ask double mindedness in both the area or any one of those. Okay, see as far as becoming a believer is concerned, salvation is concerned, there has to be a clear cut decision through saving faith that Jesus gives us. So when a believer is born again, they are born again. There's nothing double minded over there. We have received the saving faith which was provided and the believer is now born again. So you cannot be, if you are double minded, you can't really receive Christ. As far as salvation is concerned, if someone is double minded, they generally stay out of salvation. Once we have received Christ and we have become believers, what I was talking about is more applicable to us as believers. So a double minded man is unstable in all his ways. As I clarified, this is not referring to the process of gaining faith because in the process of gaining faith, we all overcome our doubts. We all slowly, we graduate to that place of faith. So that's okay. That's normal. There's no problem with that. That's the usual process. But double mindedness, as I was telling Shri Kumar, it's a state of mind. It's a problem of the will where an individual is not able to take a clear cut side that, okay, I'm going to do this. So as you mentioned of me, day to day life where we are not making decisions. We are sitting on the fence. We know as we pray and seek God and all, we know what God is leading us to. But when we make a decision, we have to take responsibility for it. So some people prefer to just sit on the fence and not take responsibility. So that is what James is talking about over here. Yes ma'am. So basically we mean that we make a decision to walk by the spirit or by the flesh. Not being lazy about things and knowing the truth but not doing something to follow it. If you want to look at it in a simplest way, not making a decision. That's also a decision. No. Yes ma'am. Thank you. Okay. Sure. Yes. Yeah. Thank you. Thank you for that question. So we must be, you know, be aware of this state of double-mindedness. It will impair our progress in the Christian journey and life in general. Yeah. Okay. So that's enough said about double-mindedness. We were talking about being doers of the word of God and not just hear us and hear. Very interesting actually. Like we could dwell on it for so long. He says deceiving yourselves. So sometimes, you know, putting in the word of God, listening to the word of God, you know, like knowledge puff it up. We read about that. We somewhere develop this mentality where, okay, I know a lot of the word and that is enough. And that gives us a false sense of, you know, walking perfectly with God because we just satisfy ourselves by hearing the word. But there are two aspects. One is to hear and one is to do. Now, if a believer is only a hearer, I'm not talking about, you know, those who are hearing and who are sincerely trying to put it into practice in their lives. It's not referring to that, but the kind of believers who are satisfied with knowing a lot of scripture. We know all the scriptures, but that's about it. Nothing else. It never translates to life and actions. Actually it's a warning. It's a very strong thing that he's saying here. He says deceiving yourselves, self-deception, where we have a false sense of, you know, a secure walk with God. That's so dangerous. And we must stay out of it. And, you know, self-deception is kind of also the error that Lucifer fell into where he had a false sense of grandeur about himself. And he just got stuck in it. He was not able to see the light that, no, I'm actually created and I'm here to worship God. So self-deception is a very dangerous place to get into. And James is actually warning. He's saying, if there's any believer, he's only a listener of the word and not a doer of the word. Then there is that danger of coming to that place of deceiving ourselves. Nobody is deceiving us. We are deceiving ourselves. So we got to be careful about that. So he moves on. He explains that further. He says that anybody who just hears the word and they don't do it, they are equated with somebody who is observing his face in a mirror. Observing is more than just seeing, you know, the kind of language that's used there is you properly consider.  But if one notices what is not in place and lets it go or forgets, hey, my face isn't washed or my hair is unken, he doesn't even remember it, looks at the mirror and forgets it. How is it helpful to even have looked at the mirror? So in the same way, engaging with the word of God should be life changing. Now if it's not changing our lives or if it's not transforming the person that I am to make me more like Jesus, then something is wrong with the process that I am following. So it's more like what he said earlier, you are hearer, but you're not a doer. Just deceiving myself where I feel, yeah, but I know so much scripture, but no transformation. So that's not a godly way of living. So he moves on verse 25, he says, but he who looks into the perfect law of liberty, incredibly says perfect law, there's law also, there's liberty also. So what is it? See basically under the new covenant, new covenant, we are now free because of what Jesus has done. We've been delivered from sin, the consequences of sin. So that's why he's calling it liberty, but also law because we are still under a covenant, a new covenant, that's what.  And this one will be blessed in what he does. So actions are also important. So faith is important. Actions are also very, very important. Now he goes ahead and remember he is talking mainly to a Jewish audience, because the Gentiles are just about the communities are just about growing. So he is talking about being religious in the next section verse 26. If anyone among you thinks he is religious and does not bridle his tongue but deceives his own heart, this one's religion is useless. So the Jews in Judaism, obviously they had so many practices which made them feel good, made them feel so close to God, but he is warning them and he's saying, we are so good for the Jewish believers. We are so good with all our day to day rituals and we are good at picking off the requirements. But then he points to other practical aspects in a believer's life. He says, you're keeping all the rituals, the traditions. How about managing the tongue or the words that we speak, people who don't have control on what they speak. We end up saying wrong things, we end up hurting people and all that. He says, what kind of religion is that? Again, he uses the term, deceives his own heart. So he's warning the believer of self-deception. It's like, again, we said double-minded but this is more like a double, I don't know the right word to use, but there's no integrity because there is one side of us which is seemingly yielding to God's word but there's no reflection in real life. So here religious practices are there but the same so-called pious believer is speaking things which are dishonoring to the Lord. So maybe there were things going on in the church where people were losing control of their words and so James had to address this matter. But he teaches them what is the right form of being religious. He did not stop them from following discipline life towards God because he understood that's their devotion to God but he teaches them the right way to do it. So about the tongue, we will come back. He'll talk more about it later. But right now he tells them that if you really want to be godly through your traditions and actions, then do this. This is pure and undefiled religion before God and the Father. What is it? Our faith should translate into charitable deeds. Through the life of a believer. So what are these some charitable deeds? You visit the orphans and widows in their trouble. So he's saying look how can we call ourselves religious when we are not meeting needs of people around us. So he's awakening them. And remember he's already discussed about rich poor because there are all sections of people coming to know Christ and he wants them to grow in unity. He wants them to honor one another. So there were needs in the church earlier in Acts. We saw how people were even selling their own goods and helping one another. But maybe the needs have increased now or don't know whether people are just caught up with themselves that he's having to address this matter. And he says religion is not about just fulfilling duties before the Lord but you let that faith translate into compassion and charitable deeds. So specifically here he says have you considered the orphan? Have you considered the widow? People who need help, people who don't have in that community these people were sort of looked at as helpless those days. And so that's why he's making a mention. But we take it as yes this category but in general people in need whoever is in need whoever is in trouble we must help them. And he says that and keep oneself unspotted from the world. Also godly living, righteous living is important. That's when we can truly say that we are living the word of God. So that's James chapter one for us. If you're all okay then I'll just jump to James chapter two unless there's some particular subject that you want to dwell on a little more. Are we good? Okay, sure, fine. So then let's move ahead. We are now looking at James chapter two here and let's see the different sections that he's going to address. Could I request, okay, let me do this. I think reading sections is better because then our concentration will be able to grasp more. So how about one of us reads from verse one to verse nine? Verse one to verse nine of James chapter two. My brethren do not hold the faith of our Lord Jesus Christ the Lord of glory with partiality. For if there should come into your assembly a man with gold rings in fine apparel and there should also come in a poor man a filthy clothes. And you pay attention to the one wearing fine clothes and say to him, you sit here in a good place and say to the poor, you stand there or sit here at my footstool. Have you not shown partiality among yourselves and become judges with evil thoughts? Listen, my beloved brethren, has God not chosen the poor of this world to be rich in faith and heirs of his kingdom which he promised to those who love him? But you have dishonored the poor man. Do not the rich oppress you and drag you into the courts? Do they not blaspheme the noble name by which you are called? If you really fulfill the royal law according to the scripture you shall love your neighbor as thyself. You do well, but if you show partiality you commit sin and are convicted by the law as transgressors. Amen. Thank you. So as we can notice, he is addressing partiality noticing that the composition of the congregation is swiftly changing. So he is already introduced to us two sections of their community which is some people who are rich, some people who are poor and of course we know that there were also other classifications maybe there would have been people from other backgrounds like the Gentiles were joining, there was differences in the gender, ages so people from different regions joining together in worship but overall what James is saying is as the church is growing equality among the believers from the spiritual point of view is very key. So here he says and he is likely addressing the leaders more than the believers you could say so he says something like if there should come into your assembly a man with gold rings. So gold rings it is said that in the times when James wrote this it was a sign of richness so people would like to boast of their wealth by the number of rings that they had so that identification is talked about here or fine or parallel and when a poor person comes obviously they don't have these things and so filthy clothes is their description but he is really saying look if you pay attention to the rich person because it is noticeable that they are rich and you give them a better place in the meeting or in the assembly you have demonstrated partiality among yourselves and become judges with evil thoughts so that is self-explanatory we all understand bias partiality and now it is happening in action so verse 5 onwards he states has God not chosen the poor of this world to be rich in faith and heirs of the kingdom which he promised to those who love him so now when we read this particular verse somewhere there is this interpretation that the poor of the world are rich in faith so because there was that statement that Jesus made about a rich man that it is easier for what was that to enter the eye of camel to enter the eye of the needle then a rich man to enter the kingdom of God so somewhere people use that and they say that so richness of faith is possible if you are economically poor and if you have money then you cannot have richness of faith but that is not the interpretation of this so how much money we have that is not a determinant of how much faith we can carry so that shouldn't be interpreted that way basically what he is saying is the poor can be rich in faith just like everyone else can be rich in faith so it is not exclusive to the poor person and in continuation he says he has of the kingdom which he promised to those who love him so the poor can be heirs of the kingdom just like everyone else can be heirs of the kingdom so we shouldn't make it sound like only if you are poor you can have these things that is not what it is saying but you have dishonoured the poor man so obviously he is saying partiality is not good you cannot dishonour a brother on the basis of his background and in this case money and then he says do not the rich oppress you and drag you into the courts so he is likely talking about some of the incidents that have happened we know that the bible also says that the love of money is the root of all evil so maybe there were some people in the congregation or the assembly who had this attitude that they loved money so much that they oppressed people they were willing to fight to maintain their position maintain their wealth so he is talking about some people now generalising it and saying oh all rich people oppress you see even having wealth is a blessing from God we know that it is God who blesses us he is the one who gives us the power to get wealth the bible says and so we are not here to discriminate just as much as we are saying ok do not put the poor down we say ok even rich should not be a determinant in the house of God to how one must be treated we are all the same and verse 7 do they not blaspheme that noble name by which you are called so he is saying the rich who do these things are putting God down so verse 8 if you really fulfil the law according to the scripture you shall love your neighbour as yourself you do well but if you show partiality you commit sin and are convicted by the law as transgressive so quite clear cut partiality and in this particular case between the rich and the poor so let's read from verses 10 to verse 13 verses 10 to verse 13 yes mangi please we also ever shall keep the world low and yet Stambo in one point he is guilty of all for he who said do not commit adultery also said do not murder now if you do not commit adultery but you do murder you have become a confessor of law so speak and so those will be judged by the law of liberty for judgment is without messy to the one who was shown no messy messy triumph over judgment okay thank you mangi in this section we see how it's important to keep the whole law and of course you know we know that this was what came in through the old covenant the law and then people try to keep it but thank God God's grace came upon us through the Lord Jesus Christ and verse 12 he says so speak and so do as those who will be judged by the law of liberty so he is calling us more to walk in that grace in that understanding of the new covenant where you know there is mercy which triumphs over judgment so basically walk in grace extend mercy yeah and if we don't extend mercy we cannot expect mercy to be extended to us in that manner let's read from verse 14 to verse 19 shall I read mangi yes amni James chapter 2 verse 14 to 19 what does it profit my brethren if someone says he has faith but does not have works can faith save him if a brother or sister is naked and destitute of daily food and one of you says to them depart in peace be warmed and filled but you do not give them the things which are needed for the body what does it profit thus also faith by itself if it does not have works is dead but someone will say you have faith and I have works show me your faith without your works and I will show you my faith by my works you believe that there is one God you do well even the demons believe and tremble amen amen thank you amni so once again a section which is concurrent with what we saw in james chapter 1 where he says that faith is important but then works you need to demonstrate that faith that faith should be evident through our lives so same thing here he says if someone says he has faith but does not have works can faith save him so we must be doers of the word and when we are doers of the word doers is what it's referring to works the works that come out of our lives and he is not saying here that we must work to earn our salvation this question is settled and we know so many passages in scripture where we understand that it's not through our works but it is through the redeeming work of the Lord Jesus on the cross of Calvary that we are saved we are born again so is james trying to say that we must work for our salvation not at all that's not the point that he is making but he is saying that when we are saved when one is saved there must also be actions you know along the lines of our faith so that's what he is saying these two things are not separate so if let's say somebody states that they only have faith and they don't have corresponding action so in verse 17 he makes the statement he says faith by itself if it does not have works what is it it is dead it is dead so faith should translate into actions and then again he gives one example simple example of actions here that he gives is meeting the needs of people there are people with practical difficulties practical challenges what is good you know if we just bless them pray for them do all the so called spiritual activity but don't do anything practical to meet the need in those moments that also is like dead religion so he says let your actions go along with your faith and these two things are not separated so verse 18 but someone will say you have faith and I have works show me your faith without works and I will show you my faith by my works so these two things are not separate both have to be there in the life of a believer so only believing is not helpful so you know he uses this example where he says even the demons just believe that there is a god they tremble but they are demons isn't it so there what comes out of them the actions oppression wickedness so just stating that we believe is not enough but what we do is an identifier of you know whether we are born again or not so again I am not saying that our works will win our salvation but then it's like fruit the fruit is a good way of explaining this when one is born again the works should be able to show that this person is born again okay let's go to the section from verse 20 to 26 any doubts any questions about what was said from universe okay you can read from 20 to 26 please 20 to 26 but do you want to do you want to know that faith without works is dead was not Abraham our father justified by works when he offered Isaac his son on the altar do you see that faith was working together with his works and by works faith was made perfect and the scripture was fulfilled which says Abraham believed God and it was accounted to him for righteousness and he was called the friend of God you see then that a man justified by work and not by faith only likewise was not to rehab the hallowed of also just by works when he received the messengers and sent them out another way for as the body without the spirit is dead so faith without works is dead also thank you master thank you so here in line with what he has been saying he has been saying that faith without works is dead so he brings up two examples and he talks about Abraham first and then rehab he says that Abraham we know that he believed God and believing God was accounted to him or credited to him as righteousness so the first thing is belief faith is the father of faith that is how we look at him Abraham he is a role model an example about faith now yes he had faith but you notice verse 21 was not Abraham our father justified by works when he offered Isaac his son on the altar so we cannot stop with saying that Abraham had faith in his heart but his life his action showed the faith that he had so what did he do he trusted God he waited for the birth of Isaac then when Isaac was born and he came into this test where he was asked to sacrifice Isaac he offered Isaac how could he offer Isaac he believed God in other passages we saw how Abraham even believed that if God needed to raise him from the dead he would do it so it's because of the faith that he carried that his actions followed he went ahead to offer his son Isaac so here James is trying to show us see faith is not separate from our actions if we have faith then our actions will follow and that's how Abraham too he was accounted with righteousness for what he believed but he was justified by the works when he offered up Isaac so there is faith there are works as well and we must remember that and as we continue in this way he uses terminology verse 22 you see that faith was working together with his works and by works faith was made perfect so how is faith made perfect well the point is the maturing the maturing of oneself in their faith towards God works are connected to that and we miss we cannot neglect works and only hold on to just believing in the heart is sufficient sort of a mentality now another example which he has here is that of Rehab and he says how her works also justified her obviously she believed in the God of Israel and she trusted that there will be protection for her and her family there is faith in her heart but verse 25 also justified by works so she did something about her faith what did she do she received the messenger she protected them she sent them another way so she did something to demonstrate her faith so he is encouraging the believers first he talked about equality no partiality now the theme is let works accompany our faith because both are important and in order to make us understand how the connection is so necessary he gives this example verse 26 for as the body without the spirit is dead so faith without works is also dead also so you see that is where he is coming with this concept of dead your faith is dead so faith without works is dead because a body without the spirit is dead so the connection is somewhat like that and we must not consider these things separate from each other so let us now move on to James chapter 3 here could somebody please help in reading from verse 1 maybe verse 1 2 and then we will go ahead verse 1 and 2 my brethren let not many of you become teachers knowing that well that knowing that we shall receive a strict judgment we all stumble in many things if anyone does not stumble in word he is a perfect man also to be bridle the world body okay thank you Mangi so here there is word of caution to those who want to become teachers and James says that let not many of you become teachers knowing that we shall receive a strict judgment so basically what he is saying is that the way you know you know teaching works in the kingdom of God is that there is a huge responsibility you know on the shoulders of a teacher because Jesus said Matthew 519 that when one whoever breaks one of the least of these commandments and teaches men so shall be called least in the kingdom of heaven but whoever does and teaches them he shall be called great in the kingdom of heaven so there is responsibility one is to ourselves live by higher standards because the judgment is going to be stricter as verse 1 says and the other thing that it states here is when we teach people that we teach accurately that they can also follow the right standards of God's word so one is to live out do and then you teach and that's the right way of being a teacher and becoming a teacher and verse 2 he says again you see how there is a you could say there is a disconnect but then if you talk along the lines of teaching the word then you can connect the next section that is about the tongue and the words that one speaks so in verse 2 the focus comes to the words that we speak so he says we all stumble in many things if anyone does not stumble in word he is a perfect man able also to bridle the whole body so what is perfect here perfect again referring to maturity full grown something like an adult right in their walk with the Lord grown up basically so who is mature you know an individual who can control their words or they have self control as far as speaking words is concern so if we can bridle the tongue or we can regulate our words by ourselves then such a person is matured as a believer that is what James is saying let's continue he is going to say more about our words from verse 3 to verse 6 please verse 3 to verse 6 indeed we put beats on in horses mouths that they may obey us and return their whole body look also at ships although they are so large and are driven by fierce winds they are turned by a very small rudder wherever the pilot desires even so the tongue is a little member and both great things see how great a forest see how great a forest a little fire kindles and the tongue is a fire a world of iniquity the tongue is so set among our members that it defiles the whole body and sets on fire the course of nature and it is set on fire by hell thank you very touchy subject very close to all of our hearts the matter about the tongue and the words that we speak so James is helping us understand the power of the words so he gives us this analogy of bits in horses mouths what happens is when people want to control horses and they want to direct horses they use these bits so as you kind of move it you can lead them in a particular path similarly rudders of ships that would use that to move the ship in the direction that he wants to so he is saying that the tongue is like that regulator it is a very small member he says tongue is a little member but it both great things it can lead our lives it can give direction to our lives that is the point it can control many other things in our lives so we must be very careful about the words that we speak now he says see how great a forest a little fire kindles again he is comparing the tongue to a little fire which can burn down the forest so that is the power of the tongue so it is something like you know the controls are in the tongue for greater things like if you just want to imagine we all have homes and we have these main electrical switches isn't it so when you put it on the whole house has electricity but when you put it off the whole house loses electricity so something like that so the controls are up here the words we speak that is what he is talking about and he says and the tongue is a fire a world of iniquity the tongue is so set among our members that it defiles the whole body and sets on fire the course of nature and it is set on fire by hell so depending on the words that we speak you can imagine if we speak he is talking this particular verse he is saying in the negative he is saying let's imagine we speak words of death you know words of discouragement words of cursing all the wrong things which is not aligned to God's nature he says it is set on fire by hell so that's how the tongue will be that kind of a fire what will it do it will burn down the forest it will burn down the house but when we remember that yes this kind of control lies with my tongue and we turn it around verse 6 if we flip it around and we let's say not a world of iniquity but then we use our tongue as source for speaking righteous things then what happens we can reap the blessings that come out of it as well isn't it so we can speak life we can speak blessings we can speak hope we can speak encouragement we can speak words of prophecy the goodness of God coming forth into people's lives into our own lives into our own families so he is trying to awaken the believers to the power of the tongue and just the way you know we can talk so much about this the way God created the heavens and the earth with the words of his mouth he is letting the believers know God has given us such an amazing capability with the tongue and so let's be mindful of the words that we speak okay so we are in continuation of the tongue subject of the tongue but I noticed the time is already 1050 so no worries in the next class what I'm thinking is hopefully we shall finish the book of James and maybe you know I'll see if we should start from Peter or just do Jude that way we would have tackled three books and then just two more to go in the coming month of April so anyway let's pray now and we shall close but I hope you're doing okay or do you feel this is sort of rushed I wish we had an extra month but we will finish I wish too but unfortunately you know we have to make do with the time that we have but I encourage you to go back to the sermon series thankfully you have the videos the notes, the power point and all of that so let's pray and close I want to request one of us to please lead and pray I'll spray Dear Father in Heaven thank you for today's lesson on the book of James and thank you for the lessons on controlling our tongue standing in faith not showing partiality not giving to anger and a host of many things Lord we have run today we pray Father that let the truth Lord that we have heard and studied we pray that Lord will become an embodiment and practitioner of this truth we pray that even Lord as we are being prepared and equipped to teach the truth so Lord all that we are learning Lord we pray that these words will not stand against us but Lord will be worthy examples of all that we have been taught and all that we teach we pray for our teacher we pray for Pastor Nancy Lord you will bless her, lift her and continue to strengthen her in this work and pray that Lord you would anoint her more and more for the task ahead O Lord we give you praise and glory we commit the next class to your hands and pray that you would give us the wisdom and the understanding Lord required Lord to put all that we are learning Lord it's a good practice and even be people Lord who will be able to expand your kingdom here on earth we pray thank you for everything accept our prayers O Lord as our prayers in your mercy and in your power thank you everlasting Lord in Jesus name we are praying amen amen amen thank you thank you say thank you everyone God bless you continue to grow in the word of God and yeah looking forward to meeting all of you next week again for our classes God bless have a good weekend thank you ma'am thank you thank you thank you thank you bye bye God bless


Good evening. I want to congratulate all of you for the fortitude and the intelligence to be here at this closing session. It's been an incredible conference where we've had an outpouring of terrific ideas and some visions even. I'm struck by the thought that Rimo Aron, the great French political scientist who also wrote op-eds, the opinion pieces and newspapers, said that there are only two sentences that count in any op-ed. It is the first one to get the reader into the subject and the last one, which is to send the reader away with the message. And that's kind of the purpose of our closing panel tonight is to get you into the subject by summarizing, by wrapping up, and then to offer you their thoughts about the future and things to come. So we will try to follow Mr. Rimo Aron's prescriptions very well. To save time, I'm going to get straight to our distinguished list of speakers. You have their biographies. And so I'll let you look that up.


Hello and welcome to this session. This is Professor Farhad and this session we would look at a vendor fraud using conditional formatting a minor data Visualization and the pivot table this topic could be covered in an introduction to data analytics and accounting or simply data analytics course auditing internal auditing or external auditing Managerial accounting for internal control purposes as always I would like to remind you to connect with me only then if you haven't done So youtubers where you would need to subscribe. I have 1,700 plus Accounting auditing funny and stacks and Excel tutorial if you like my tutorial, please like them share them It doesn't cost you anything Subscribe to the channel if they help you it means they might help other people connect with me on Instagram on my website Farhad lectures calm you will find additional resources to supplement your accounting education to have access to those excel files Especially to study for your CPA exam CMA exam enrolled agent and your accounting courses I strongly suggest you check out my website So to illustrate this concept we're gonna be working with this fictitious file where we have accounts payable clerk name The vendor the invoice amount the invoice date and the payment and this could be a large file Thousands of files that we are working with it doesn't matter or hundreds One of the most common or classic fraud scheme is when the accounts payable clerk and the vendor form an unusual relationship What happened is the vendor Will get preference treatment in terms of payment or discounts from the accounts payable clerk and in return The vendor will give some sort of a bribery or some sort of kickback to the vendor after the accounts payable clerk All this happening at the expense of the company So we're gonna try to see to find out if there's any unusual relationship between the accounts payable clerk and the vendor So the first thing we're gonna look at is Since we have the invoice date and the payment date We're gonna find out how many days it's taken us to pay vendors So basically if we take the difference between the invoice date and the payment date notice here for example The payment date was February the 22nd the invoice was February the 1st and we see it's taken 21 days to pay so first we're gonna compute days To pay we're gonna we're gonna just gonna take this formula and scroll down So we have it for all the data so we can measure days to pay So that's one way to start our analysis because that's relevant if if we are paying this vendor early It means we might be giving them some preference treatment because cash is skinned The company wants to preserve cash the company wants to delay the cash payment as As much time as possible and the vendor at the same time They want to accelerate the payment as early as possible So is there any unusual relationship between the two? So the first thing we're gonna look at is just gonna look at an overview about the vent the accounts payable clerk Vendors and amount first. Let's see if the vendors are buying a lot from a certain vendor That's the first thing we're gonna look at before we look at the days to pay. So how do we do so? We're gonna create The pit we're gonna be using the pivot table now if you don't know how to use the pivot table Please look in the in the description or in the In the card above here in the video and it you'll have access to all the videos. So I'm gonna go to pivot table and Select the range it automatically select the range for the sheet because my sheet is ready and complete I'm gonna do a new worksheet and I'm gonna select the accounts payable clerk Which is the name of my clerk Adam Ashley avi bella so on and so forth. I'm gonna look at the vendor and The vendor amount and I'm gonna put the vendor as column this way it looks It it it's it's what I really wanted to see the The accounts payable clerk versus the vendor in the amount. So this is the table that I built now again tables and dollar amount Oftentimes they're not as useful. It's what you want to do You want to turn this into a percentage and there are many ways you can do that So one way I'm gonna do so if I'm gonna turn those numbers into percentages to find out if the if the the dollar amount is Are concentrated for one vendor if there's any special relationship at these it appears if there's any special relationship between one vendor in The account payable clerk a certain account payable clerk so I'm gonna click in here anywhere and I'm gonna set the value to Percentage of column total so turn everything into a percentage. It's way better because it's gonna show you the size now Again, this is not gonna give me much what I'm gonna be restoring to now is kind of a minor a minor Minor feature of data visualization. So this is I can I can select all this data. I can go to home conditional formatting and what I want to do is I want to look at color scales and the color scale I'm gonna be using is the red yellow and green because we're all familiar with red yellow and green and I'm gonna select this and what's gonna happen is this it's gonna look at my data And it's gonna show me the color and if if if if if a percentage is large more than 50% Well, it's gonna show it in darker than the others and if a number that's very large like 100% maximum It's gonna show it to me in red and notice here. It seems Bill bill our account our accounts payable bill buys the only person that buys from SLC ink That's unusual. Why why aren't other accounts payable for buying from SLC link? Also, we can see that Justin buys almost 60 percent 58 percent From dizzy 58 percent, but also we have to we all see we only have a Justin and Maggie So this is what we have from the screen that that doesn't mean much We just have maybe we want to look at this a little bit further But now we know that Bills is concentrated at with SLC ink So let's see if there's any if there's any unusual relationship between bill and SLC ink the next thing I'm gonna look at if I'm gonna I'm gonna be creating a pivot table to find out how many days it's taken to pay SLC SLC ink so I'm gonna go back to my information to my original information insert pivot table I'm gonna do the same thing for now. I'm gonna do the accounts payable clerk the vendor and I'm gonna put the vendor as column and I'm gonna measure it by the days to pay because this is what I'm measuring Some of the days it's not it's useless. I want to know the average days at stake and to pay a vendor So I'm gonna click on value Field setting here and I'm gonna be looking at the average. I can also do so from from here Okay, but now I need to reformat this so it makes more sense because it's per days I'm you reformat this and take out all the zeros format and number No decimal because it stays it doesn't make any sense. I formatted my data now remember I'm looking for bill here I'm looking for bill and I'm looking for bill and the relationship between bill and SLC if you remember we've we identified that SLC could be a suspicious Transaction so let's take a look So bill that takes both 32 days on average to pay his vendors But he's paying SLC in 14 days. So I see something unusual here now I can also do a data visual Visualization as well. Let me just kind of show you what I can, you know It's kind of this is why this is a powerful tool because it shows you immediately if there's anything unusual So if I look at this, let me go to conditional formatting again Because I know what I'm looking for but let's assume there's something else. I'm not seeing let's go to home data visualization conditional formatting Red yellow and green click on it notice here. It's very low. It so bill is Paying SLC very quickly. It's taking bill. It's cutting the check every two weeks. However on average Bill pays the employees every the vendors every 32 days. The company pays on average 36 days Notice here the company on average as we just highlighted in maybe write something here So here's what I'm here's what I'm looking at. I'm seeing that on average the company pays On average 36 days, you know, we notice here that Tom pays on average 19 days 15 days pays Journeys in 15 days in facade LLC in 37 days. Also, this is made might be a little bit unusual Why 115 why 137 but definitely definitely bill if his average payment is 32 days Why is he paying? SLC in 14 in days so that this is this is unusual. Also, we see here Bala 25 days But 29 days on average others others are 38 days So if we look here, we see that on average So this is also a little bit unusual. Why is he paying cold entertainment? Maybe maybe cold entertainment do give us a discount And that's why we pay early. I'm not saying anything wrong I'm just saying those are the things we we should be looking at. Also Adam pays cold entertainment Little bit early 27 days and his average on average It's state it takes Adam 42 days to pay his bill, but I'm gonna be focusing specifically on SLC in the 14 days once I know that's the case I can click on it and Here's the all the invoices from SLC if I'm doing this investigation The first thing I do I'm gonna look for duplicate So I'm gonna highlight the invoice amount and see if there's any duplicate payments because duplicate payments are the first Are the first sign of something, you know, something could be wrong It doesn't mean we may not have duplicate value So I'm gonna click on conditional formatting and go to duplicate values and it's gonna highlight my duplicate value So I have two duplicate values one check for amount 273 twice and one for 405 now They're on a different dates. That's fine. They're on different dates But what what's the possibility that we're buying the same amount that would be an invoice the same amount It could be the case, but it could be suspicious that we're cutting two checks for the same bill Is that could be the case that there's fraud going on We're just basically double-billing the company and paying the invoice twice. Is that the case or not? Well, that's a starting point in our investigation. What else can I look at in terms of? In terms of average days if there's anything unusual, I mean, this is this is for you But this is where this is the starting point of the investigation So notice here we use the pivot table We use conditional formatting conditional formatting is very powerful either to identify the duplicate real quick and identify the duplicate checks The duplicate amount the duplicate amount that doesn't mean the really duplicate They could be legitimate, but you can find a duplicate and the pivot table help us organize the data in a way that make sense To us so make sure if you don't know how to use conditional formatting if you're not use the pivot table I do have tutorial you really want to be comfortable with these items and this is basically a Minor form of data visualization minor minor just coloring. This is basically a coloring scheme going through conditional formatting as always I would like to remind you to Check out my website for additional resources Especially if you are accounting student or CPA candidate Farhat lectures calm provide additional resources for you to succeed in your education Especially pass your professional certification exam. Stay safe and good luck


Start recording, good. All right, so welcome everyone to the fifth lecture, which means that we are one third of the way through of bioinformatics for plants and animal sciences. The stream will start soon. No, we started streaming. So for today, I made a basic R introduction for you guys so that you guys, when next time we have R in the assignments, you can be better prepared and well, enjoy it more because programming is an enjoyable experience, I think. All right, so the overview of today is using R as a basic calculator, the different types and the type system in R. One of the things which will screw you up is the type system in R. R has many different types and it auto-converts from one type to the other type and I've been programming in R now for, I think like 14 years or something since my master, it's that long ago that I did my master.  So, 10 years, 10 years since my master but I started at the beginning of my master so that means that I've been programming in R for like 12 years or something, so it doesn't matter. So we will talk about types, about indexing, about variables, how to make scripts, clean coding, one of my pet peeves because clean coding is something that really makes coding better. We will talk about control structures and escaping. So it's more or less the first two lectures or the first three lectures of the normal R course fused into one, so we have to get a move on and really start doing it. But first, I wanna go to the previous assignments. So let's go to Notepad++ and let me open it up for you guys and then show you the thing as well. All right, so these are my answers. I will put them on Moodle, of course. The thing is, the way that I start is I always start doing something like this. So I have like a couple of hashtags which are, so these are comment characters in R. And then I just say answers to the assignments of lecture four and the guy who made it is me. Normally you would put in a copyright statement as well, but since these are assignments, there's no real need for copyright statements. So my R scripts always start with a set working directory at the top because you need to move to where you start your folders. So in this case, it is on my D drive, in a folder called D drive, then in projects, lectures, bioinformatics and animal breedings. And I'm still loading the old data set from the 2016-2017 course. And then I have a folder called assignments in that. So the first rule or the first line after that is loading in the data generally, unless we have to load some packages, but loading packages comes later because there wasn't a separate assignment for that. So the first one is to just load in the microarray data. And then I use the dim function, which stands for dimension to get the dimensions of the microarray. It's always good to ask for the dimensions after loading it in. So you know that it loaded in the whole data set. Sometimes you load in a data set which you know has like 20,000 rows, so 20,000 lines in there. And then when you ask for the dimension, it only gives you like 400 or 500. So then it stopped loading halfway through. That sometimes happens in R, especially if you have like a comment character, like a hashtag somewhere in your data set, it might break based on the hashtag. Or there might be a hidden character like a slash zero or some Mac OS X or Linux character in there, which will break the loading of the data set. So the first things that I do when I load in a data set is always ask for the dimensions. And in this case, also the assignment asks you to do the dimensions, right? Because we wanted to know how many samples there were, so how many columns there are in the file and how many mRNAs have been measured using how many probes. All right, so let's open up the R window for you guys and show you guys the R window and then don't do the notepad window. So let's start by setting the work ring directory loading in the microarray data. And then it tells me that there are, so the first one is always the rows and these are the columns. You can have multidimensional matrices as well in R, so we could have like four or five or six dimensions. But in this case, we only have two dimensions, so it's really a matrix. And well, the answer to 1a is that there are six columns in our file, so six different samples and there are 22,283 rows, meaning that on the microarray that we use, there are 22,283 probes. Could be more, sometimes the same probe is on a microarray a couple of times and I think also this data set is filtered for the standard control probes. You always have a control probe called dark corner and bright corner and those are the negative and positive controls, so they might still be in here, they might be removed. But there's generally a lot of kind of control probes in there. All right, so then the next exercise was to make a little bit of a boxplot and then I will make the window a little bit smaller so that we have room for the boxplot. So the code was actually in the assignment, so someone had a problem with that, right? Test of starters was you the one that got invalid argument for the boxplot? I think so, but the boxplot should be relatively straightforward, so this is how it looks when I do it. So I have LAS and then I have C-E-X dot axis equals 0.7, so this is the magnification of the axis so you can see that here everything fits and then you have LAS equals two and LAS equals two rotates the stuff. So did you use the exact same code or did you use something else? It might be, did you copy the code from the Word document? Let me try that, let me open up the Word document and copy-paste in the code from the Word document. No, I don't get an invalid argument then either, so I don't know. Do you still have the code that produced it? Because there shouldn't be any errors there. So the next two questions were to figure out what these two parameters do, copy it from the assignment. I'm copying it from the Word file, you can't see that of course, but when I copy it from the Word file then it still works perfectly fine. Wait a second, I'm looking at the Word document, I gave you guys the PDF. Let me open up the PDF and copy it from there. Documents, Doc-X, Biomphematics, assignment for PDF. It might be that there's like a hidden PDF character thingy in there. So let me select this and then copy it and then paste it in. No, it still looks exactly the same. Are you using Windows or are you using another? Because PDFs actually can Windows. So let me see, if I copy an additional like 2A or something? No, I don't get that error. Normally you would get an invalid error if you type things in wrong, but even then it would just not, it would not do anything, it won't give you an error. So I'm really wondering what's going on there. Was it the first boxplot or one of the other boxplots that you have to make? It's really weird. Dim microarray was also 362 in mine. Ah, okay, so then something got messed up when you downloaded it or when you loaded it in. Well, try again, I would say, and there should be 22,800, so it might be that when you downloaded it, the file got corrupted, the microarray file, and of course when the microarray file is corrupted, it might mean that there's not enough space there so that it kind of stops loading halfway through. But yeah, so if we put the CX.axis to 0.1, right, we can see that the axis here becomes smaller, right? So if for question 2B it was make the boxplot with and without specifying the CX.axis, what does CX.axis do? So the thing that it does is make the axis magnification bigger or smaller. So you can put it to two and then it will become like really big, you can put it to one, which is the default and you can put it to 0.7, like I did in this case to show the entire thing. So the LAS turns the axis. So you can see that when I do it with LAS equals one, it's like this. When I do it with LAS equals two, it flips the axis around. So it just rotates it 90 degrees. All right, so then before we start, we need to log transform the data because when you look at the data here, you can see that the distribution is really weird, right? So you have a lot of values which are very close to zero and that's why you see the boxplot and then you have a massive amount of outliers on the top. So the outliers on the top go up to 100,000 plus and that is of course because this is intensity value. So they are Lumen or the amount of intensity that you get. So light intensity doesn't really follow a normal distribution. It's more like a Poisson distribution. So before we can do anything with the microarray data, we have to log to transform it. So you do that by using the apply function. So I will show you the answers again. So let me show you the notepad++ window. So that is of course the next assignment. We have to move through the R to the notepad++ window as well. So here you see the, so here's the LAS orientation of the axis, CX dot axis is the size of the axis and then we want to log to transform. So what we do here is we use the apply function. So the apply function is kind of a for loop. So in this case, we apply to our microarray data set. Then we have two which is to the columns not to the rows. So one is rows, two is columns in this case, the log to function. So we're just going to take the data set and log to transform it. So when we go to R and we do that and we make a new boxplot, so let me copy the boxplot code as well and then we go to the R window. So when we do that, we now see that we have a different distribution, right? So now we can see that the boxplot looks a lot more normally distributed. So you see that most of the arrays, the median of the arrays is around 10, sometimes a little bit lower, sometimes a little bit higher. And you see that the range now has changed. So some values are actually below zero, which is bad. But what you can see here is that the range is around like from like 0.5 all the way up to like 16. But if we would look at a single one of these, so instead of looking at a boxplot, we could do a histogram. So we could do that, right? So say histogram, microarray, log, and we just take the first microarray, then we see now that this looks more or less like a normal distribution, a lot more like a normal distribution than the raw data looks. And of course we want to do that because of the fact that most statistics that we want to do in the end are parametric statistics. So we want to use things like t-test and of course for a t-test, I need to have a normal distribution. All right, so what happens when you do microarray, log, microarray, one, log two? The same because taking the log two value doesn't really depend. The thing is is that it just will change the ordering, I think, because if I go across the rows, right? So I do it, this is via the columns. So now if I ask the dimensions of the microarray, log variable, then you see that it's still 2,228 rows. And six columns, if I would do the same thing but go via the rows, if I now ask for the dimensions, you see that it flipped it around. So now the thing which used to be in the rows is now in the columns and the stuff that used to be in the columns is now in the rows. So if I want now try to make a box plot, then that would crash R because then I'm trying to make 22,000 box plots and that will just not be possible. It will not be able to fit on the screen.  But the thing is is that if you go by the rows or by the columns, the values don't change because taking the log two of the value 10,000 will always be the same value. No matter if you iterate through rows or two columns, it will just be the exact same value. But when you do it by the rows, it actually flips them around. So the columns become the rows and the rows become the columns. Of course, you can easily fix this because you can just have the transpose function deal with you. So the transpose function is in the rest of the lecture. So if you want to transpose it, then again it takes the matrix and flips it on its side. And now we have 22,000 rows again and six columns. So, but that's the difference, Jan. The difference is that it will flip it around. All right, but now we know that the distribution looks a lot better, right? So, and of course I just asked you guys to look at the box plot. Wait, I have to first do it like this so that it's in the right dimension. And then I can just make a box plot. And now you see that all of the distributions look more or less similar. You see that the first two arrays have more outliers than the rest of the arrays. So they have some outliers on the top, some outliers on the bottom. And the other arrays don't really seem to have that. You also see that the variance around the median is less in the first two box plots. The other box plots have a little bit more variance. So they are slightly differently scaled. All right, so then the next step would be is because of course this could just be due to the fact that some of these microarrays have been done on different days.  But in the case of having a microarray company or a company that does microarrays, they could spread it out over several days. So every day has its own little variance, right? So there could be that the temperature is a little bit higher, the humidity in the air is a little bit different. So that means that on a day-to-day basis you have some variance in scanning the same box, the same microarray. So if you take the same microarray, scan it on day one, then scan it on day 10, then the values would be shifted a little bit because of the environmental conditions. So one of the things that we want to do is get rid of that. And for that we can use this pre-process core package to normalize the quantiles. So I will first load the library. So it's just loading library pre-process core. I think I already installed it, so that should not be an issue. The code to install the package was also in the assignment. So I hope that that works for everyone. Sometimes if you have a very old version of R, you can't install this package. But then you just have to update your R version. And then of course we take the microarray log. Let me show you the Notepad++ again. So hey, of course what we then do is we take the microarray log variable, so the log to transform data, and then we normalize the quantiles. I think there was a little error in the assignment because the assignment said that you should do it on the microarray data. And of course doing it on the microarray data doesn't really work. So there was a little bit of an error in that assignment. So I'm sorry for that. I try to redo most of the assignments every year to make sure that all of the errors are out there. I made a note. I think someone also mailed me, so thank you for that. So I made a note, and in the next version of the assignments, the error will be fixed. So normalize quantiles on the microarray log data, and then the thing is in R we have to put back the column names and the row names because the normalize quantile function, if we would just look at the microarray log, right? And we would just look at the first five rows and then the first five columns. It looks like this. So you see here the measurement values. Oh, sorry, you're not seeing the R window. So if you would index it, right? Because it's a matrix, you can just use the square brackets and I'm asking show me the first five rows, show me the first five columns. And then it gives you this like little matrix. But then you can see that here are the measurement values and you see here the names of the samples. And then here you see the different probes. So the probes have names like 1007 underscore S underscore AT, which actually means that this probe is originally an Arabidopsis thaliana probe, which is a plant model plant. But when we do the normalize quantiles function, it will not copy the row names and the column names onto the new variable that you assign it to. You could, but normally it doesn't. Sometimes it does. But I always put them back originally. So I just take the column names and the row names from the previous variable and then put these on the microarray log QNorm. So quantile normalize data. All right, so let's put this in R and then make a new boxplot and see what happens. So let me show you the R window so that you're there live. So now what you see what it did actually is it now made the median of each boxplot the same because now every boxplot has the same median. The difference in variance in the different boxplots has also been standardized. And you can see now that also it has the same amount of outliers on the bottom. And there are no outliers on the top. But what this function just does, it just says that, well, go through each of the microarrays and make sure that every microarray has the same average value kind of and the same variance. So hey, it removes this day to day variance. It doesn't know exactly what it removes. It just takes the names of the, or it just takes the microarrays and it just shifts the microarrays so that they all have the same median. So what it does is it calculates the overall median and then just divides every number or it just subtracts the difference from the microarray medium to the overall median. And then it standardizes this stuff by calculating the overall standard deviation and then dividing every value. So it just takes the values and shifts them around every bit. Of course, values which used to be low on microarray one are still low on microarray one. So if I would, for example, plot the values of the microarray log values, right? Against and take the first microarray. So the first sample and I would plot those against the microarray log QNorm. First microarray, then you would see a relatively straight line, right? So it just took the values and moved them a little bit. So you can see that values that used to be five in the old array are now lower than five. So it just took the data, pulled it down a little bit and you see that it's not a straight line but you can see that a value which used to be low is still low, a value which used to be high is still high. So the ordering of the array, so the ordering of the probes didn't change. So that's kind of what it does. All right, so the answer to what do we see now is we see that the range of the data is similar for all samples. So all samples now have the same median value, they have the same variance, so you can compare microarray to microarray and if you don't normalize them, does it do it by probe? Kind of, so it calculates the overall mean of the data, it calculates the overall standard deviation of the data. It does the same thing for each of the arrays individually and then it starts by going, taking the distribution and then just doing a transformation on the distribution. So it just says the difference between the two medians subtract that from every probe, right? So then every probes get pulled down or it gets pushed up and then the standard deviation works the same but that's a little bit of a more difficult transformation because every value needs to be adjusted a little bit. But in the end it does it for each of the probes on the array. So every probe on the array gets touched, it gets changed based on how far it is away from the current array that you are looking at and the global median. So that's kind of what it does. And in the end, of course, you have a picture where you just see, okay, so all of the arrays now have the same median. So this will kind of remove any effects, for example, if you would put too little DNA on the array, right? Because if you put less DNA on one of the arrays than on the other array, then of course, the array with more DNA on there will just have higher intensity values. And this has nothing to do with biology, just this just has to do with you not being good at pipetting, so putting like difference amount and that always happens. You can have the exact same amount of DNA no matter how well you are in pipetting. All right, so let me look at the assignment. So that's the normalization. There are many other different ways of normalizing. So you could normalize it yourself, but this is the easiest way to do it. All right, so what is the major difference between this box plot and the one from question 3a? Well, this one is normalized. It has most of the variants or the differences in variants are removed and the differences in the median of the arrays are removed as well. All right, and then I want to do just one of the additional questions. So the additional question was to do a little bit of clustering and I just gave you the code for that. So I just wanted to show you how the results should look. So all of the additional. So what you see here is when we do a clustering and we do it, what we do is we ask it to make a distance matrix. We have to transpose the matrix. So we go from rows being columns to columns being rows. And then we calculate the distance matrix or the distance matrix is then calculated for each row against each other row. And then we do HACLIST, which is a clustering algorithm which then using the distance makes a clustering and then we can plot the different clusters. So what you can see from the data here is that there are four samples which are relatively similar, right? So they are relatively equal to each other and then there are two samples here which are also relatively equal to each other but different from the other four. So looking at the data here, it seems that there are more or less two major groups in our data. One group containing two micro arrays and the other group containing around four micro arrays. So that's kind of what this tree shows you. And then there was a scale variation. So finding the highly variable probes. I think I left that question in, right? So the scale variation, since we can't really do any t-test, right? Because we have, well, we have a group of two individuals versus a group of four individuals. And for a t-test you need at least three individuals in each of the group. So three versus three is the minimum sample size that you need for a t-test. But you can still look at the scale variation. So that means that you apply to the micro arrays, to one, to the rows, a function of X. And then you look at the variance of X divided by the mean of X, right? So if something has a high variance and a high mean, then this is weighed less than if you have a high variance and a low mean. So you just look at the ratio between the variance of the data and the mean of the data. So you get stuff which is highly variable. So if we do that and we do that in R by just copy pasting in the code that I gave you guys, then you will get this scaled variation, which is just a vector. Let's look at the first 10. So for each of the probes, it will tell you what the ratio between the variance and the mean is. So for example, for the first probe, it's 0.006. For the next probe, it's 0.009 and so on. And of course, like the variance is always or generally much smaller than the mean of the array. If we would plot this, of course, then this would look like this. I think I can still plot that. It's only 120,000 points. And so you see here that across the different probes on the array, we see kind of a wavy pattern. I don't know exactly why, but you see that there are some probes which are relatively having a high variance compared to their average value on the array. And of course, we can then take these and make a nice box plot of these so we can say which ones are the ones which are highly variable. So what we do is we ask R, take the scaled variation vector, look which ones are above one, ask which ones those are, and then just take the names of those. And those are the probes which we call highly variable. So if we then look at highly variable, then this will just contain probe names that are above the one line. So we just draw a straight line here through the data and we say everything which is higher than one is an interesting gene because it is variable in our data set. And then of course, we can make a nice heat map to kind of look. So when we do that, then we see that it looks more or less like this. So again, we can see the same structure in the samples on the top. We see that there are two samples which are very similar. And then we see that there are four samples which are very similar to each other but different from the other two. And then here you see the probes and you see then the expression of the probes in across these. So you see here that there's a group of probes which is high in the two samples here and which is low in the other four samples. And then of course here we see the same thing but it's less high in the second one but it's still, if you look at these like four, it four to six, it seems that they are high in this sample and low in the other sample. So you can't really do statistics because it's only six samples and you can't do a t-test because of the way that they group but you still get a little bit of an idea. So then you could look at which genes are these probes targeting and then you would take the names of the genes and then look to see if there's anything known about why these genes might be very different between the samples that you put on. All right, so create and look at the heat map. What is the thing we can learn from this? So my answer to this is we observe the groups we saw before however now in the second group, there's a typo in there, so let's fix it. Now in the second group we see that there are again two groups. We learn which probes and genes on the micro ratio are different between our samples. So that was the idea. So just a little bit of basic R so that you guys could look at it. I think there's also a question about the, about the structure prediction. So I didn't do the structure prediction. I hope that everyone was able to do that. If you were not, then let me know. If you want me to do it for you guys, then I could do that. It's just that it takes a long time. The RNA molecule which codes for the SARS-CoV-2 spike protein is relatively big. So when I did it at home, I had to wait like five minutes for the website to do the structure. But I think it's relatively simple, right? It's just using the RNA fold web server and just putting in the code that you found. But if anyone has issues with it, then we can do that. But I really like to start with the assignments or no, with the lecture. We're done with the assignment. So I really wanted to start with the lecture because the lecture is long and there's a lot of R that we have to go through. All right, so those were the solutions or at least my solutions. I will put them online and test the SARS. Do check what's wrong. And if you can't figure it out, then send me an email and we can schedule a date to kind of remote desktop in. What I would advise you first is to try to re-download the data set. It might be that when you downloaded the data set, something went wrong and it got cut halfway through. It happens sometimes. Sending stuff over the internet has a, and there's no error checking or not a lot of error checking. So it could be that that's the thing that's doing that. All right, so R as a calculator. I think that most people know that R, you can just use it as a calculator. So if you will just type in stuff, then it will give you the answer. So hey, if I type in one plus four, it will give me five. If I do five divided by 10, it will give me 0.5. There are some special operators. So if you wanna calculate the exponent, so five to the power of two, you have to use this roof symbol or you can just use the multiply, multiply operator. So two times multiply means to the power of. So this is five to the power of two and this is also five to the power of two. Just remember that the decimal separator in R is always the period, never the comma. And that is something that goes wrong in some countries which don't use the decimal separator to be, like in American system, you usually use the comma for separating thousands and the dot for separating the decimals. In Germany, it's usually the other way around. So you use the dot for thousands or space for thousands and a comma for the decimal separator. But it's never, in R, it's always a dot. So if 0.5 is half, 0 comma five is just an error. And you will run into that sometimes because if you get an Excel file from someone from Zimbabwe, for example, it might be that he is encoding his numbers with commas. So then you have to recode it using a more sane system. There are some special numerical constants in R like E and F for infinite, NAN for not a number and NA for a missing value. So values are allowed to be missing. Missing values propagate. So if you calculate the mean of a set of values which contains a missing value, then the mean will also be missing. You can get around that by using NA.omit or RM.NA equals true, but NA's propagate. And there's a good number why NA's propagate because in theory, when you really have a missing value, right, then the mean is undefined. So it's not, you don't know what the mean is. So if there's, if you have 10 measurements and one of them is missing, then you don't know what the mean is. So that's why the NA's propagate. About the Euclidean division and the Euclidean division remainder, I always show a single slide or two slides actually, which kind of explain this. And Euclidean division and Euclidean division remainder are very useful in programming, especially when you start writing your own loops and doing multicore programming to kind of put stuff on different CPU cores if you have a multicore CPU. So then you use Euclidean division a lot and also Euclidean remainder. So the way that it works is it's similar to normal division. So when I learned how to divide stuff in school, they taught us to do it like this. So if I want to divide 100 by 39, I put 100 in the middle and 39 on the side. And then I have these, these, these kind of brackets here. And then the first thing that I do is I try to fit these, this number into this number by blanking out the last zero. Right? So can I divide 10 by 39? No, I cannot. So then I have to add a zero. So had this teaches me that the answer will be one number less than 39. So it will not be above 10. Well, that's not that important. But what we see is if we have 39 by 100, then we can put 39 twice in 100. And then we have 78. And then this will look like this. So, and normally you would then start continuing the computation. So you would then put a comma here, put a new zero here, pull the zero down and then look how often 39 would put into 220. And then you would just continue this until there was no division remainder. But then you would get not a, you would get not an integer number. You would get a floating point number. So you would get two points, something in the end. But here for this example, had the Euclidean divisor in this case is two because 39 fits twice in 100 wholly. And then after that, you have 22 remaining. And this is the Euclidean divisor remainder. So in this case, we're not doing the nonsense by putting another zero here, pulling it down and then continuing with fractionals. No, we just look to see how often 39 fits into 100. So that's twice. So you can divide 100 by 39 two times. So you can take out 39 two times. And after you've taken it out two times, there are 22 left. So what does this relate to multi-core programming? Well, in multi-core programming, this would mean that if I would have 100 items that I need to calculate and I would batch them out into 39 elements together, then I could use two computer cores, right? Two computer cores are full, so doing 39 elements. And then I need a third computer core, which would do 22 elements. And then I could do all of them in one go or I could do all of them in parallel on a multi-core computer. This is not that useful yet, but just be aware that R has special functions. So it has the Euclidean division, which is percent slash percent. And it has Euclidean division remainder, which is percent percent. So it will come up sometimes. All right, of course, R has a whole bunch of other things which are built in. So there's a whole bunch of built-in constants, like letters, written uppercase. And those are just the 26 uppercase letters of the Roman alphabet. So this is just a vector, which you can use to select from. It also contains letters, small letters in lowercase, which are the lowercase letters of the standard Roman alphabet. We have month.up, which are the three-letter abbreviations for the English months. And we have month.name, which are the English names for the month of the year. So if you ever want to do anything with programming and you're wondering what is the seventh month, then you can just do month.name, square bracket, seven, square bracket close. And then it will tell you the name of the seventh month. So sometimes that's useful. And sometimes you need to, especially when you're dealing with data, which is measured across the year. Another very useful built-in constant is pi. And pi is the ratio of the circumference of a circle to its diameter. So I think everyone knows how to calculate the surface area of a circle, which is two pi r. So that should be okay. But it's just a built-in constant. So you don't have to multiply with 3.14, 15, and these kinds of things, no. In r, you can just say two times pi, and then it will just have more or less an infinite precision on pi, which is better than just using 3.14. R also supports imaginary numbers. So everyone who's ever wanted to calculate some spring constants, like imagine that I have a weight which is suspended from a spring and there's a thing with water down there and I let go of the weight, which then drops into the water and goes up and down. Then you have this kind of dampening curve and this dampening curve, you can only compute using imaginary numbers. So r supports imaginary numbers, but not by default. You have to put plus zero one i, and that makes so. If you ask for the square root of minus one, it will say this is not a number. But if you ask for the square root of minus one plus zero imaginary part, right? So this is the same as minus one. Then it will now tell you that, oh, indeed the square root of minus one is i, or minus i, of course. Can someone ban that guy? Yeah, got him, got him. Very good. I like that, like wanna buy followers. No, we're here to get followers the old fashioned way. So imaginary numbers are supported in r and of course we were not gonna use them soon and in bioinformatics I think I used imaginary numbers like three times during my entire PhD and after, but sometimes you need to. So sometimes imaginary numbers can be really useful. Hey, yeah, I know, but you were not there, so I already banned the guy. I can do the ban hammer as well, so not only that, but I can also make you VIP or revoke your VIP status and stuff. Anyway, so r also supports basic trigonometry functions, so sine, cosine, tangent, arc sine, arc cosine, and the arc tangent, which is really nice when you wanna do trigonometry, like doing triangles and circles and these kinds of things. So hey, you can just do that in r and they are named by their normal name. They are functions, so you have to put like round brackets, so sine of five is, you just switch out log by sine. So you have to use the round brackets. So the log of five is just a natural logarithm of five, which in our countries, we would say this is the ln, so the natural logarithm, which is E as a base. So this is poorly chosen. So log five, I always think 10 log, but 10 log is actually log 10 and then use the five. So this is the base 10 logarithm of five or this is the natural logarithm of five, so it uses the E, so it uses E to the power of, like X, right, so exponent one is E to the power of one, exponent two is E to the power of two and so on, so those are in there. So E is not a building constant, X is just a function to get the E number, which is 2.8 something, I think. So I hope that everyone paid attention in math, but all of the math is just available in R. R is just a big fancy calculator. All right, so R follows the standard operator precedence, so the order of operations in R is not left to right or right to left or the way that people normally would do it first. So if you have a big sum, right, then first you do exponents and roots, then you do multiplication and division and then you do addition and subtraction, so you often see like these Facebook posts where people say, what is the answer of 10 minus three times two? And then, well, go. What is the answer to 10 minus three times two? Come on, people, you can do it. Just put it in chat, don't be scared. It's just one of these Facebook tests that your aunties and uncles always try to look smart on. All right, Testosaurus says four. Are there any other answers? Or do we all agree with Testosaurus? Like you all think that the guy named Testosaurus the answer correctly? Or is everyone already asleep? If everyone's asleep, we're gonna have a 60 second ad break right now, but let me see. Is there anyone else in chat beside Testosaurus? Yeah, not too many. Like Jan is still here. Like the rest of the people have already left, I think. Four, ah, very good. Thank you. Skurrita also thinks it's four. All right, very nice, very nice. Sandra also four. So everyone thinks it's four. No one comes up with 14 being the answer. They will be under the Facebook post, right? Under the Facebook post, you would see 14, 28, like 37. We all went to school, yeah, sure, sure. But this apparently is very, very difficult. But yeah, you first do the multiplication and then yeah. Thank you Jan, yeah, Jan, very good. No, but yeah, you first do the multiplication. So three times two is six and then 10 minus six is four. So, but look through your Facebook history. You see a couple of people that actually go and answer stuff, which is very different. Of course, the real answer is of course four plus zero i, which of course, if you are dealing with imaginary numbers, is the only correct answer because you never should forget the imaginary part of the number. So four plus zero i is actually more correct. Anyway, so this is the order of presidents. So to remember that, I think everyone in high school learned, please excuse my dear Anne Siley or in Dutch we have a different one. And I bet Germans have a different like donkey bridge kind of thingy to do that. Anyway, operator presidents, it's in our, and it will bite you sometimes if you don't take care of it. You can always add like round brackets to force presidents. All right, so now we start with the real programming stuff or more programming stuff. So if you are dealing with R, then R, when you start R, you get something which is called a session.  So this is the random access memory, which is more or less, if you buy a computer, it tells you that you have 16 gigs of memory in there. They mean random access memory. There's a lot more memory in your computer than just the 16 gigs, which is plugged into the main board. But in R, everything goes in there. So if you are filling up a vector, so my computer is like 16 gigs, I think, or perhaps even a little bit more, but after 16 gigs, it will just say, I am out of memory. So be aware that that will happen when you start dealing with big data sets. But you can manage your session. So something that we already saw is the set working directory command, which will allow you to change your working directory or where you are on your hard drive. You have the get working directory command to get the current working directory. So when you start up R, you are generally in C users, Denny slash documents, something like that. But of course, I always want to go somewhere else because I don't store all of my data there. I store my data on my D drive or on my E drive or it's on a flash drive. And then you have to just use the set working directory. And this goes wrong a lot of the times. A lot of the times, many of the things are just like, oh, I can't read the table. Then people are in the wrong working directory. That happens a lot. All right, so we can do a dear command and the dear command shows us the current files in the current directory. So it will show us what's on your desktop or imagine that you are on the C drive. If you type there, then it will show that there's a Windows folder, there's a program files, there's a users folder, sort of standard stuff on a C drive in Windows. In the session for R, you have a similar command, which is LS. So the LS command shows you currently which variables and functions are loaded into your R session. So these are not files, these are variables which are defined. So let's go back to the R window. We can do that quite quickly like this. So here I can do a dear, right? So when I do a dear, I see that these are all of the files that are in my current working directory, where I did my lecture. And if I do an LS, I can see what's currently loaded in my session. So I have a variable called clusters. I have a variable called highly variable. I have a variable called microarray and so on. And you also see here, scaled variation. Scaled variation is of course the vector with the variation numbers. So it shows you which variables are there. So of course, if I would just type X, then I would get error object X not found because of course, there is no variable called X. And sometimes this can help you debug stuff, right? If you get an error which says, oh, I cannot find this object, then you could just use the LS function to see if this object is actually loaded or if you just made a typo and you can compare this to the list, right? So if I would make an error and type microarray without a double R, then it would say, oh, this thing is not found, but then I could do an LS and figure out, no, it's actually called microarray with double R, so it helps. We can install packages into R. We did this for the preprocess core package. The preprocess core package actually does not come from the standard R repository. It comes from the bioconductor repository. So the bioconductor repositories is separate from the standard R repository. If you wanna install stuff from the standard R repository, you can do that using the install.packages function. You give it the name of the package that you want to install using quotes because it expects a string and then you can load the package after it's installed by using library. If you wanna save an object, for example, you loaded a big matrix of data and you want to save that as small as possible, then you can save an object as a binary file and this will also allow it to be loaded into R very quickly, especially for the people who had not a very good computer and loading in the microarray dataset took some time. If you don't have an SSD, but an older hard drive and loading in this microarray dataset takes a little bit of time, then you can actually save the microarray object. So you say, save microarray comma file is microarray.rdata and then it will save a file to your hard drive called microarray.rdata and you can load that in using the load command. So when you then say load microarray.rdata and this thing will load in much quicker because it's only like one-tenth of the size of the original text file. So if you're working with big files, then the save and load command can help you save a lot of time because this will save it in a binary format which R can just read. If you wanna save all of the objects, which I would never advise you to do, but imagine that you're working in R and you've done, like you've defined variables and all of these things and all of a sudden you have to go and you don't know where the windows, the windows update is already shouting. I will start my windows update in like 10 minutes and hey, you really need to go and you don't want everything to be lost. You can type type save.image and then you just give it a name. Always name it with an Rdata extension and this will save all of the variables. So it will just take your entire LS and go through each object in LS and save it into one big binary format. If you wanna quit, then you can use the queue function and then you can add the string no. This will quit the R session without saving the current environment. I never save the current environment. It is a source of many, many bugs.  Like think no, you never want to save it because then the next time that you start up R, it will start loading in all the other variables that you already had. And when you are programming, you want to start with a clean environment, right? We want to have reproducible research. So something that you did yesterday should not affect the code that you are running currently. So never, ever save your R session. So if you quit, just type queue with the word no in there with the air quotes and then this will just quit R, not saving any of the stuff to the disk. All right, how long have we been talking? 53 minutes. All right, so we will do a short break. Like I said, I will probably run a 60 second ad break and then you guys can enjoy the old animated GIFs. So I'm hoping that that's not bad. I didn't have time. I was talking to a couple of our PhD students the entire morning. I was planning on finding new GIFs for you guys to enjoy but you just have to do it with the old GIFs from last week. So I'm sorry about that. I will stop the recording and then I will start the break and I will see you guys in like 10 minutes.


Mzansi mourns city LYTS as police launch manhunt for musicians killers. As SA mourns the death of DJ city LYTS, police have confirmed that they have launched a manhunt for the killers of a popular musician murdered in the early hours of Monday morning. The Mkaiz family confirmed the star's death, saying at 00.30 on the morning of February 14 in Dube, Soweto, four men ambushed Sandil city LYTS guys. Two of them opened fire, fatally wounding him. A close family friend told F5 News that DJ city LYTS was shot dead at about midnight after being confronted by a group of men. He got shot. A VW polo came and four armed guys jumped out pointing guns at everyone. When they pointed the gun at city LYTS one of the friends tried calming the situation, saying guys let's not do this, what's going on. Then shots were fired at city, in the stomach. When he fell everyone else ran away. As they were running shots were being fired. He said the men shot at a nearby car to prevent it from giving chase. The friends said he did not want to be named because of the police investigation. Shortly after news of city LYTS death broke, Gauteng police spokesperson Mabla Masando issued a statement confirming police had launched a manhunt after a musician was shot dead in Dube, Soweto, in the early hours of Monday, February 14. Police were called to a murder scene in Dube at about 2 AM and on arrival they found a 32 year old man lying on the ground with gunshot wounds to the upper body. He was certified dead by paramedics. It is reported that the deceased was on the street with his friends when they were shot at by suspects driving in a silver VW polo. Masando said the motive is unknown at this stage and police are searching for the suspects. Police are appealing to anyone who might have information that can help in the investigation or assist apprehend the suspects to call the nearest police station or call crime stop on 08 600 101 1.