All the material in the workshop is organized as RStudio projects, and this is why we were so adamant about actually getting the pre-work done because you'll need to download an RStudio project to get started. The project we'll initially work with is here, so HTTPSkitab.com, Hogan, and RIntro. So what you need to do, as you know, to load such a project is you go to File, New Project. So you go to File, New Project, open New Project under Version Control, with Git, type this address, and put the project folder into your course folder. So in your pre-work, you've already done the very same thing with an introductory project. This is, our intro is the one we need for this workshop and course. When you are done with that, kindly put a blue post-it on your laptop. If it didn't work, wave your hand or put a red post-it on your laptop. If it didn't work, wave your hand or put a red post-it. I see some blue post-its. Go to RStudio. Don't go to that site in Chrome. You need it for opening the project in RStudio. All the pre-work was done in RStudio. Do you know how to find RStudio on Windows or RStudio? Most of us use Mac computers. Lauren is our resident Windows expert. RStudio scares me. If the project has started, the first thing I'd like you to do is, as the startup screen probably said when you launch the project, is to type in it. I've typed this in this pane up here, the top left pane and I've hit return and of course nothing happened. If I want to execute this function, what do I need to do? Either control enter, that will execute things from the script pane or type in it into the lower left pane which is the console. If I type it into the console, I just hit return. If I type it into up here, I hit control enter or on the Mac command enter. This will run a little script which will initialize two functions and probably create two files that are called my intro notes, my sequence analysis and my data integration. Let's have a brief, first of all let's check whether everything is set up correctly. Your project folder contains all the files that you see on the right hand side, on the lower left in the file menu. But R also has a concept of a working directory, i.e. by default, all the files that you're looking for or all the files that you want to load or work with are in this working directory. Let's check whether the files that you see in the file pane on the lower right hand side are actually the files in your working directory. Do you remember how to get the working directory listed? There's an R command, getwd and this displays a string of where on my computer the current working directory is and this also happens to be the directory that I know where this is installed but I can check and make sure that this is correct by figuring out what the actual directory listing is and that's a command to list files. Did we cover that command and the command is list files, get files? I can't remember. List? List? Okay, so I type list, and this pops up, once I type three characters it gives me a choice of different commands that start with this. So I do indeed need list files and I can either tab or click on that and it brings up the command. Now list files is a function, all our functions are followed by parentheses and I can put things into the parentheses, these are the parameters to the function, that's what I want the function to work on. The parameter is a function like list files could expect is for example a directory, what I want files listed in but if I don't put in parameters the functions usually have default behavior, the default behavior here is to get the files from the working directory. So when I execute this, I get a listing of the files that is approximately equivalent to the listing that I get on in the files pane. There's one difference, do you notice the difference? Yeah, some files are hidden, so list files like normally the directory functions in your operating system, Windows or Mac, doesn't show the so-called hidden files. The hidden files are files that start with a period, with a dot at the beginning. The files pane graciously shows us all the files that exist and that's really important. But list files by default omits the files that start with a dot. And these files have some special behavior. For example, our profile in your working directory, if it's a project directory, is a file that is automatically loaded when R starts. So for example, our profile here is this little file that defines a function and then prints out some strings welcome and type in it to set up the session. Okay, now the way we're going to proceed in this workshop is to practice mostly principle of development. In the five minutes preceding, I've mentioned five or six different R functions and R commands and there are hundreds by default. And there are thousands if you include all the special commands that get loaded from packages and there are literally thousands of packages that extend R's functionality. It's impossible to keep track with everything that happens in the R world. So that's not the way you do it. The way you work with R is not to try to memorize all the different functions. The way you work with R is to adopt sound principles of solving problems, taking a problem, breaking it down step by step systematically and then going through the steps individually and figuring out, well, how do I express this in computer code? How do I express this specifically in R code? The way that I teach this is actually something of a subset of R, not using all of the R functions that we could use to make maximally efficient and maximally concise R code, but it's kind of a somewhat pedestrian way of doing things for several reasons. One of the reasons is if we take things and rather than using functions that do everything in one expression, but rather do it step by step, it's much easier to troubleshoot and to verify that what we're doing is actually correct. And that's hugely important. The worst case scenario is that you think you're doing something right, but you're not doing it right and this will lead to a nasty letter from the editor of a journal to your supervisor that says, this paper has to be retracted because the data was wrong. You never ever want to be in that situation. So validating things and making sure what you're doing is correct is the most important thing that you have to do. The complexities of actually getting things right, especially in bioinformatics, are actually huge as you know and as we'll encounter in this workshop. So taking things slowly, working through things step by step allows you to validate through every single step whether what you're doing is what you think you ought to be doing or what you think ought to be happening. And that's really important. The other thing is maybe 10 years ago we would have still discussed what is the best language to learn for bioinformatics or what is the best language to use to do this. Well, nowadays we don't do that anymore. We realize sometimes we need to program and compile code in C++. It just has to fly. So we need a fast compiled language, C++. Or we have to contribute to a large enterprise scale project. So unfortunately we'll have to write some Java code. Or we're collaborating with people who are working in Python. So we start writing some Python code. Or we're doing the fun data science analysis and machine learning and mangling your data and that's where R really shines. So there are different languages that are good for doing different things. And we kind of have to be able to read all of them, understand them. Usually we all have a favorite computer language that we go to for our everyday tasks. But really the particularities of the language we should be agnostic to that. Now that means if we write in a language that and write very, very idiomatic code, our code is locked in. People who have very little R experience but come from Python might have problems understanding our code. These people might be your summer students who can't read your code, who are learners. It's like if I go to an international conference and I say something like this came out of left field or any other of the many, many North American baseball idioms, I'm likely not to be understood. Because idiomatic use of language is nice and is elegant if you want to write a novel. But it's not very good for sharing information. So the subset that we use here is actually very similar to the same code that you would write in Python, for example. Some syntax differences, but it's probably really, really easy to take it command by command, expression by expression, and simply translate from R to Python. So this is one of the goals here. Making things slow, making it explicit, not being too idiomatic, not using all of the possible shortcuts that R provides and being very, very explicit about it. That's actually a supremely important part of software development. If you wanted to work, make things explicit. Translate implicit knowledge into explicit knowledge. So the way that we'll proceed here is we'll define a couple of tasks, like many projects. I'm not even going to tell you how to solve them. You solve them on your own. I'm sorry. That's the way life works. Nobody is ever going to tell you how to do things. Well, at least not in a sustainable fashion. If I just show you code that works, you'll maybe learn a little bit. But once you step out the door, it's going to be very difficult to adapt this to the kind of code that you actually need to run at home. So we'll focus on problem-solving strategies on how to find answers and how to implement them. There's four little mini projects here. Not all of them are on the GitHub project yet. But in principle, we'll be working on simple sequence analysis first. We'll go through a larger project of data integration. We'll work with numeric data, in particular protein structure data, and we'll be using some of the bioconductor tools to round it off. So these tasks are all contained in various R scripts. And we may update them, or actually I'm sure we will update them during the script. And that's actually very easy. This is a great paradigm to share work.  GitHub also offers private spaces if you need to share confidential work with collaborators. But you need to pay for these. The public sites are free and they're accessible by everybody. So you download projects from GitHub. If you own the project, you make your changes locally.  And then you upload the changes to your master copy. Once your collaborators or the people in your class then download this, all of the new updates are shared into the project. So I make changes. I upload them to GitHub. You pull the new version of the project from GitHub and you have the updated files. Now there's a caveat to that. If you edit R scripts that I edit too, your edits will be overwritten. And that's not good. Because what you really have to do during this workshops is take lots and lots of notes and write things and comments and code experiments and all of that. And if these would be overwritten every time I update a project, you would be rightly very unhappy with me. So what the init function does when you run it, I've written it in a way where it takes the R files that we will be working with and makes a local copy for you. So these files are called my something something. For example, my data integration, my intro notes, my sequence analysis. So these are derived from data integration or sequence analysis.r. These are the project files that I've created. But these my whatever files are the files that you actually work with. You edit them, you put your code experiments into them. They're not going to be overwritten because they don't actually exist on GitHub. They only exist locally. So they don't get overwritten. So save these files but don't commit them to version control because that will create a conflict. Now keeping a journal is supremely important for this. The important things that you take home are not the scripts. The important things that you take home are concepts, ideas, attitudes, little tricks that we've talked about that are not obvious that you won't easily find with a Google search. And these are things you write down as notes. So write as much as you can. You have notepads. Maybe some of you have really gone out and got themselves a nice journal for writing their important workshop diary. So code examples, task annotations go into these my whatever files. But concepts are much better paraphrased and then handwritten in your journal. And you will find that this dramatically improves your focus and your understanding. I go to a lecture. I always, as the lecture goes along, I'm writing. At the end of the lecture, I may never look at these notes again. But if I don't do that, a day after I walk out the door, I've forgotten what the lecture was about. If I write it down, that doesn't happen. I don't know. Maybe this is just me. Maybe it's your experience too. If you've never tried it, try it in this workshop or maybe you'll discover something new and very, very valuable. So let's have a brief look at what's in the box here, what we have in the files folder. So these top files here are files that work internally. Our profile is the first file that gets loaded when the program starts. init.r is a file that actually initializes your session. There's a reason why I don't initialize through our profile, which is a bit technical. There's a folder for old materials. The workshop that I'm teaching this time is completely redesigned from everything I've ever done before. In particular, in the past worked a lot with just going through code scripts and explaining scripts. I'm not sure that's the best way to learn. There's a place for that. But I think what we need in this introductory tutorial is more things that you do yourself. So I've completely changed this. There's a folder with assets, which actually just contains a PDF, which we might discuss later. There's a folder with data, which has some data files which I'm providing. Some of these overlap with files that I actually want you to download. So we can use the ones that exist in this folder as a backup. But some of the files I'd rather like you to discover where they live and how to get them from the web. These two files are the source files for the R units we'll be working with. There's a file called function template. If you write your own functions, here's a template on how you can do this. And we'll go through that later. I think we'll have a task of putting a function into this function template. It includes headers that describe what the function do, what the parameters are, what the resulting values is, and so on. Similarly, there's a file called script template, which looks very similar, but is kind of a template that can get you started on working through code in your own projects that are told in a systematic fashion. There's a folder R. Typically, the folder simply called R contain R functions that have some use in your project that you've written for your particular project. There's a folder called sample solutions. Don't touch that. This has my sample solutions. But you're not going to need that, because you will write these solutions on your own. You don't need my stuff here. So this is just for me to check back if I get confused and don't know what I'm doing. And there's a folder called tests, and we'll discuss a little later about how to test for correctness in your codes. So our first step is going to work with simple sequence analysis. So what I'd like you to do is to open the file, my sequence analysis. And this will allow us to recapitulate ideas that we have encountered in the preparatory workshop and extend them a little bit. Now, in particular, we will download 100,000 nucleotides from human chromosome 20. If I do a kind of genome annotation practice work, I like to work with chromosome 20. It's plain vanilla chromosome. Not one of the largest ones has about 500 genes, so it's kind of manageable, not one of the big ones. So let's consider these 100,000 nucleotides from the human chromosome, and let's figure out the dinucleotide frequencies and consider whether the dinucleotide frequencies are random. And at the end, we want to come up with a plot that kind of looks like this. So if you source this command here, this is the plot we'll be having at the end. It's a dinucleotide frequency plot. We have the dinucleotides here. We've sorted them by frequency. We have the frequencies computed. We have observed, and we have expected frequencies. And that's what we will end up after this little tutorial. So of course, if we want to do something like that, we start with reading the data. So this is our first task. Find a source to download nucleotides 58,815,001 from the HG38 assembly of chromosome 20. So what's HG38? Yeah, who uses this identifier? Do you know where it comes from? Not really. This is from UCSC. UCSC has the assemblies as HG38. Do you know what the previous assembly was at UCSC? 19, HG19. So why did it go from HG19 to HG38? The thing is, there's actually a human genome reference consortium that updates the human genome assembly. It's a product that's still in flux. But the reference assemblies have gone through many, many different stages. And the prior version used to be GRCH37. I will need to erase this. We'll need to recreate it, but I need the space. Sorry. So the previous assembly was GRCH37. And UCSC, who've done fabulously important work in integrating genomes and making the data available and making the data visible, have also gone through different iterations of their internal data. And the corresponding one is HG19. And people always got confused, why is one 19, why is one 37. So the next iteration, the currently current human genome version is GRCH38. And this corresponds to HG38. Is there a better marker? So we would like HG38 of chromosome 20. We want a source for particular nucleotides. We want to download them. We want to have them on our computer. So how do we do that? How do we do that? Any suggestions? Where do we find nucleotide data? On the web. Not with our. We're not even using our yet, except to take notes. NCBI is one source. UCSC is another source. Assemble is a third source. So which one should we use? OK. So let's spend, it may matter, because the difference is that they all have the same data. But it may be easier or more difficult to actually get the data from there. And to get the data in a programmatic way. So why don't we spend like a minute and randomly either choose UCSC or NCBI or Assemble at the EBI. And try to just, you know, try for one and a half minutes to get that requested data. See how far you get. OK, was anybody actually able to access the data? It's amazing. You know, if you have a room full of smart people, lots of things can happen. So tell me, what did you do? I went to UCSC. OK, OK, I never remember the URL. What's the UCSC genome browser URL again? Genome.UCSC? Yay, OK. So you clicked on Genome Browser. And by default, we have GRCH38, XC30, and something like this. At the top, under View. Under View? DNA. UDNA. OK. And get DNA. OK. And now we need to download it, right? I guess, like, for what I do, you need to copy paste. But so far, this name is not. This probably would work with copy and paste, but we'll try Save As. File. Save As. It says Page Source or Web Archive. Ooh. This is almost what we want, except it's in an HTML page, and we would need to edit it to do that. So if you do this only once, you're done. You can edit this and then save it in the way that we want. But isn't there a way that we can download it as a text-only file without tags at the end and where we actually have to edit the file? Which might be somewhat onerous if you're actually downloading a whole 100-megabyte chromosome. So that's the point at where I said, maybe you, CSC, is not the best solution for that. Any luck with something different? Any luck with something different? I was like, I could not select the, I don't know how to select the position. Right. There are ways to do this in Bioconductor. I automatically connect with the databases. But I'm kind of partial to Ensembl. I think the Ensembl tools generally are, of all the tools that are out there, the most built with the philosophy to support programming and APIs and programmatic interfaces. So in general, if I need to solve something with a script, if I have to look at something just on the web, NCBI is fine, UCSC is fine. UCSC is actually very good, very rich. But if I have to do anything with programming, usually I get where I need to be faster with Ensembl. So let's try Ensembl.org. Ensembl.org takes me to a local mirror, US East Ensembl.org. We can search human for this thing. That all looks very, very similar so far. In the top window, we have the genomic region overview. In the lower window, we have the details of the 100,000 nucleotides we requested. And we can click on export data. And the output should be a fast A sequence. The location is given here. We can refine it if we need to. We can request five prime and three prime flanking sequence if we want any. We want genomic unmasked. We don't want repeats or anything masked. We actually want the 100,000 nucleotides that we're asking for. Now we can choose whether we want HTML or text, and we can even get compressed text if we're looking for a very large file. And now we have that. And if we download that one now, this is the file. This is an actual text file. So let's download this. We want to name the file chromosome 2100 kilo base pairs. Load it as a fast A file. And it appears here. And that actually is the actual nucleotide file. So far, so good. What format is this? Sequences come in many different formats. This is a fast A file. Fast A is kind of the workhorse of sequence files. It's a human readable format, which is good if you want to check and perhaps even edit things. How is it defined? You kind of look at it and you intuitively get an understanding of how the file is structured, but how is fast A defined? Because that's really important. If we want to write code that reads and perhaps introduces fast A files, we have to understand not just what types of files we commonly encounter, but what the actual specification for the format is. So if I ask a question like, how is this defined? And you don't know. Where can you find the information? Google for it. So Google for it. Where do you find information on fast A specifications? And Google tells me there's a fast A format Wikipedia page, which explains the format, has examples, and so on. So make this a habit. If I say something that you're not familiar with, raise your hand and ask what it's about, or Google for it, or find the information, you have to be active information finders, especially in this workshop. Now, there are, in fact, historically different versions of fast A. The canonical way of using fast A files today specify that there's one and only one header line. This one and only one header line is the first line of the file. This first line of the file begins with a greater than sign, or a closing angle bracket. And it has text data of any kind of text. Probably assuming assi text, not unicode text, because that's formatted differently. Okay? Right. So we went to the ensemble page of chromosome 20 with the requested coordinates. Okay, we'll go through that again. So we go to ensemble. On ensemble, there's a search field. We select human as the species we want to search with. And below that, we paste the coordinates that we're looking for. They kindly give us a formatting example. So this is chromosome 5 and rat. This is human chromosome 20 58,000815,001 to whatever. That's something I can type into my notes. Go to ensemble.org human paste the coordinates we need. And click on go. That takes me to the ensemble browser for the region. Now, if I click on export data, I get all of this verified again. So the location to export GRCH38, the output is a fast A sequence. The location is this and so on. And we want genomic unmasked. Once we're there, we click on next. Choose the output format. In this case, text. Right, but then you have to uncompress it locally. Right, because then it's a compressed archive. So if you click on text and you get the region and then using my browsers save as function. I download it to my project directory and call it chr20-100 KBP dot fast A. Typically, your browser will contain at that point mimimi. Do you want to call it fast A? It has to be a text or mimimi. It looks like it's an HTML page. So call it HTML. I don't know why they do that. If I tell it to name it fast A, please then just do that. You might have to rename the file if it doesn't arrive in the directory. So the end result has to be you have a file called chr20-100 KBP dot fast A in your local project directory containing these nucleotides. This is a small portion of it. Chromosome 20 is 10 megabases or something like that. So it's just a very small portion. Oh, actually no. We can see where we are here. Right? So this is the entirety of Chromosome 20 and we're picking out this little separation here, which is 100 KBP. So I think we have data. Usually that's the most troubling step. Once the data is on the computer we're safe. The data from the web into your project directories is often much more involved than you'd like it to be. So we're going through a few examples here just to practice that step. Now we said this is a fast A format. We briefly I briefly mentioned how this is specified and defined. There's a first line which is a header line which has header informations and after that we have sequence in one letter code. This is nucleotide sequence. We know because it looks like nucleotide sequence. This is not alanine glycine threonine alanine and so on and cysteine. But sometimes nucleotide sequence and protein sequence can be ambiguous. So that's one of the downsides of the fast A file. It doesn't require semantics. It doesn't require people to specify whether this is nucleotide sequence or protein sequence. Typically we recognize our four bases but they're also ambiguity codes. So for examples we can have R for perimidine bases or W for bases that form two hydrogen bonds and so on. You see that in this case the formula is uppercase. Fast A format also allows lowercase. And there's in principle one special character that is also allowed and often used in a fast A format which is the hyphen which is simply denoting a gap. That's really important if you store aligned sequences in a fast A file. And when you store aligned sequences often you put more than one sequence into the same file. This is something that we actually call a multi fast A file. This is also something you'll encounter quite frequently. So the file can contain more than one sequence and in that case it would have more than one header line. And each sequence would start with this one header line. So now that we have that the obvious next thing is to read this data into R. Right? So how do we do this? It's a text file and we want to read this information into R. Any suggestions? So on your console just type read and you will notice that there are many many many many different versions of read. Sorry, I should really unload some packages here. There's a read.csv there's a read.dlim there's a read fwf readbin for character for binary read character So which one would you use? How would you find out which one to use? Right? Well, R's help function. So for example we could type question mark question mark read this will give us information on many many many different R pages that all contain something about reading in particular information from other packages which are loaded and available for R. So with something very generic like read this may not be as useful. Can you just like hover over the reads and then check the information for each one and select the one that fits best for you? Right. So we can do that. Read.csv reads a file in table format and creates a data frame from it with cases corresponding to lines and variables to fields in the file. So read.csv is that takes a file name parameter and then as a separator for elements uses commas. This is a format that we use very frequently csv is for comma separated values or for example read delim it's basically the same description file now here the separator is backslash t what's backslash t that's a special character it's a tab So these are files that are tab separated often we store them as .tsv files tab separated values so csv files are files that we encounter often but we don't have separated values here we just have texts, lines of texts so as Pascaline said we scroll down and look and read binary no this is not binary data read character well no actually read character we might be able to make this work but it's actually for reading single characters from a text connection something like reading input ignore read fastay because that's a function I defined read lines read some or all text lines from a connection that kind of sounds like something we want to do all the text in a file so we define a file or a text connection and then continue from there let's see if Google agrees read text file into R read csv read text this is a different package data import and so on anyway if we browse along that we will find a number of different solutions now let's use read lines our file name is ch20.100kbp sure so when you're looking for a command for a so when you're looking for a function it will automatically complete for you but when you go to put your file name you can't set it up to do that where it will sort of automatically give you the options of your files I wish I've never maybe there's a way I don't know does it do that I think if you do read line for file equals and then the quote read lines I think in this case it's equals you see it okay I didn't know that that's so useful it basically also works in any kind of text string now if we simply execute that command though all this will do is it'll take the file and dump it onto the console that's not what we want to do we actually want to assign it to something so let's assign it to something let's just call tmp and assign to read lines and let's have a look at what we get okay now we've assigned this to a variable what's the next thing we need to do write the next thing we always need to do after we read something is we need to check whether what we have is what we expect so what would you check right but what what would you want to know about it whether the sequence is there and whether it's complete right so if we look into the environment pain this variable tmp has been created it's a character vector it has a thousand six hundred and seventy elements it kind of shows me what the first element looks like but we look at that in a little more detail so from that that kind of looks correct we have a vector we have sixteen hundred seventy elements each element in that vector is going to be a piece of text so an important command to to use is head and tail so head gives us by default the first six lines of a vector or a data frame or a matrix and that shows the first line as expected is the header line and then we have text going on what was that other command that I just mentioned to get the end of the line tail so tail shows me that you might have noticed the other line does not actually the last line actually did not extend to the end of the screen so that's good there's two extra empty lines here which don't bother us but we'll need to be aware of that once we actually do something with the file that there might be empty lines so that all looks from there that all looks good so this is a vector let's recapitulate a little bit what we know about vectors value right so there's a number of different categories there's data which are tables like data frames or lists or more complex object there are values these are assigned variables so basically vectors or scalars or single variables and there's a section of functions which have been locally defined and I still have a lot of stuff in my workspace I'll clear that out during the coffee break but you don't have any of that so under the values category you find the variable name TMP and the information about TMP let's say we want to see only the first three lines of TMP head gives us six we only want the first three how can we do that that's one possibility head takes extra arguments so if we give it the number of lines that we want to see here for example three we get the first three but more generically this is a vector how do we get the first three elements from a vector we can do this and get the three now this is very flexible remember there's different ways to access information from a vector one is by explicitly specifying numbers like a range like one, two, three or one three five seven or one, two, three but in reverse order and so on so we can access this in many in many different ways as a vector now is this a convenient way to keep the data or what's the best way to keep the data now when I ask about what's the best way to do something that's a loaded question because the answer is always best for what what do we actually want to do with it when we define what we want to do with it it's often clear how to store something or how to operate with it before you do that it's really an ill-posed question so without specifying what we want to do with the data this format of keeping it in memory is as good as any other because all the data is there it's not particularly inefficient it's just not easy to use for particular tasks so what tasks could we be interested in doing with a sequence file in principle finding short strings of sequence for example finding substrings what else could we want to do calculating gc contents what else variance variance variance finding particular positions for example finding dinucleotides all of these have slightly different pros and cons for different formats in principle there are two competing ideas one idea is to put everything into a single string one word of 100,000 characters and that's useful for example to find substrings because we can apply so-called regular expressions to that regular expressions are a very powerful and versatile way of finding patterns in sequences we'll encounter regular expressions later on before warned they're a bit salty but extremely useful so this is why we can't avoid regular expressions now if we look for a pattern like g a a t t c a format like this is really not good because our g a a t t c might break across a line and if it does that we wouldn't find it in any of the lines of characters so this is why in that case keeping everything in a single word is much preferable but if we have everything in a single word how do we calculate gc contents how do we count the number of g's in the string like this not easy in that case it is better to break the string apart break the sequence apart into a vector that has one character per element it's a vector of length 100,000 elements and keeping every element separately and then it becomes relatively easy to count single nucleotides and so on so that's what we'll do and for that we will write a function that takes a file name as an argument and returns the sequence as a vector with one character per element we will write a function to read fast-a files so it takes the file name as an argument and returns the sequence as a vector with one character per element and a good thing to do here would be to open the function template and edit that so we'll call this read fast-a.r and we will save it as so we have a local copy okay so do that with the function template build yourself save it as read fast-a.r and then we'll work on that so the general description is read fast-a sequence file the author is you I'm a little bit obsessive about keeping header files intact and actually adding the information you might think initially I'm never going to use that and I'm never going to share this with anybody or it just doesn't matter I can just dump the code into a file and it'll work just as well well in principle you may be right but things like that have a habit of progressing and accumulating more code and accumulating more intelligent things especially if you use them in a project and reuse them so if you start yourself out doing things with a clear header and a clear definition and clear comments everywhere you'll do yourself a favor and you'll do that person who's very dear to your heart a favor which is you yourself half a year from now when you need to revisit that code and you'll just throw up your hands and discuss by thinking at that time I have no idea what this code is and doesn't you'll need to rewrite it because it wasn't commented or you don't know what the value is or whatever so keep this thing structured it's a really really useful habit it'll save you a lot of time in the end and it also helps you thinking somewhat systematically about the code which is also really important so the date today is the that's the way I write dates and that's the only way I write dates why? there's a beautiful cartoon you know a boy and a girl standing together and the girl asks the boy what's your idea of a good date and he answers year month day everything else confuses me so why this way? universal yes that's always good especially in these times but there's actually a functional reason for writing it this way right if you sort things according to dates in this format if you sort them by text it will be sorted chronologically so this is why this format is useful okay now the function would be read fast A function parameters we've said we'll use only one file name purpose is describe read fast A file return a vector we might refine that we might not allow every letter but right now that's all we'll do at the sequence letters the parameters are fn vector constant which is file name of the input file the value is what the function returns r functions return at most one value they don't have to return any value some r functions are invoked for so called side effects something like printing something to screen or making a plot or changing something in the global environment these are side effects but pure r functions return a value and do not touch anything else anywhere r is what is called a functional language and functional languages work really really well if you write your function so they don't have side effects in particular we never change values outside of the function that's if you ever do find yourself doing that don't it's really really bad to happen could but you shouldn't so change only values locally and anything that comes in as a result is returned as a single value now of course we have vectors are these single values as a vector is a single value but what happens if we want a vector and annotation and maybe another function three different very very different things well in that case you can just combine everything that the function ought to return together in a list and return one list so in principle r functions return only one object but the object can be arbitrarily complex in this case the one value we return is character vector single letters sequence and in the details I describe some limitations for example we discard the header which we might not want to do later on we might want to store the header somewhere with our vector then we add the code and we return the result of whatever the result is now here's the thing r functions by default return the last expression or the result of the last expression that was evaluated in the function before it arrives at the bottom of the square bracket we can write that way I think this is very poor practice r functions that I write always return their results explicitly it simply makes it easier to read the function and figure out what's going on you don't just fall through through the end and then mysteriously the value arrives you explicitly return the value other programming languages also require you to explicitly return values so I don't see any benefit in doing it the idiomatic way in r on the contrary it becomes harder to read is possibly prone to misunderstandings possibly harder to maintain there are two other sections that I have in my function template one is examples and one is tests and we'll get to these a little later on in more detail now these are in conditional blocks and the block is if false then do something so what does this conditional block do what does a block like that do let's not think about why we do that just tell me now what does it do if I execute this block it does like reading the faster file no so this is a conditional statement conditional statements work they start with an if then there's a condition and then there's a block of expressions if the condition is true the block of expressions is evaluated if the condition is false the block of expressions is not evaluated so what's this condition here it says it's unconditionally false it's always false so if false does nothing this block skips everything that's within the curly brackets why in the world would we do that well the reason is if we have a function template like that we can simply source the entire thing and then load the function if we also want some additional information for example information of how to use it or tests that we don't want to execute every time we source the function so we put these in a separate block that is not actually executed so when we source this piece of code we define the function but we don't actually do anything in here so here is where we then write our example code if we manually go into the file we can always select them and execute the commands in here to experiment with our examples or run the tests change this to true whatever but the way we just write this function and then later on keep it in our our directory to be automatically executed we don't actually want anything to happen we want to be able to source the thing and skip all of that this is why we have a conditional block here that does nothing alright so the next thing to do is to write the code or is it? No we never start writing code what we do instead when we develop any kind of functions is we break up what we want to do step by step and simply write it as comments into our code so let's try to do that we want a function that reads a file breaks it apart assigns it to a vector and then returns the vector so first step is read the file second step remember it's a fast day file separate header let's discard the header discard the header then so in our example here we start with a vector of 1670 lines now after discarding the header we have 1669 lines so what do we do with these now it's one word of 100,000 something characters break it apart did we miss something I don't know this is a real question this is not rhetorical did we miss something Greg did we miss something you do it that way okay so time for a coffee break after the coffee break we'll actually implement this but in principle this is the template of our workflow to develop a function we first of all vaguely define what it is supposed to do then we think about how to break this down step by single step our steps as something we often call pseudo code like simple line by line instructions and then we implement the single instructions and then we verify that what we did is correct and then we test and write tests and so on so there's more stuff to it but this is the principle and we'll follow that religiously for every single example here this is the most important thing that I hope that you'll take home from this workshop if you want to solve something don't start writing our code writing code is the last step but be absolutely clear on what you want your code to accomplish


Hello and welcome, today we're going to review what we did the other day but in doing it a different way. So the other day I showed you how to pull down all the files from a website, an HAR file which is a HTTP archive file and then extract the base 64, convert it, get the images you want, put them into a PDF and we did that for your book from Classmates.com.  What I should have shown you in the first video is again, I'm in Chrome but most web browsers have a developer's panel. Usually it's F12, if you don't have an F12 in Chrome, I control shift I to open that up. We're going to go to the networks tab and then we'll refresh this page. I also have it clicked on images so it's only going to list images down here but any image that loads on this page will appear down here and as I click through here and more pages load you can see them loading down here. I can right or I can left click on here, I can see a preview of that and if I want that image now I can right click and say save that image. If you only need one image from the page that's fine, again they must have an invisible layer or something over here that prevents you from clicking on this image or something in JavaScript that prevents you but it's still loading down here. Now in the last video I showed you how to again pull everything down in HRA file which is great. It makes it very simple if you have a page you have to log into to access the stuff. I noticed if I right click this and I say copy image URL and then I open up an incognito incognito mode or a private tab which in Chrome is control shift N and of course I'm going to have to do this and now I paste in that URL I can load that image. That means we can download these images without having to go through credentials and login which you can do from the shell. There's different ways you know curl and W get both allow for login information but we're trying to keep this simple and that makes it very simple that I don't have to log in if I have direct link to this image and I don't know how long that link if it expires at some point but if I was to go into a folder such as this say W get put in that URL for that image and download it you can see that it appears here I can open that up and there's that image right there downloaded. You notice that it does give that full name after that so there's more after the dot jpeg but we're not going to worry about that right now we're going to move that with a script we still need to get a list of all of these so I'm just going to move that to trash for now. So again I'm in a empty directory here this is my shell up here this is the same directory down here just so you can see as things load going to go back to my web browser and just like last time again you can fully automate this for sure but we're going to just assume that you're going to only download a few of these so writing out a full script to automate the entire thing is overkill again if you're going to be downloading hundreds of these yearbooks you're going to want to fully automate the system but all I have to do now just like last time is I can go through here and I can click through and just allow each page load and as I flip you through each page you'll notice down in the developers tab on my network tab here you can see the pages loading that's right down here okay so as I go you can see them loading and again these yearbooks are scanned by users so it even has signatures and messages from the people in the class who signed their yearbooks which is just adds to the coolness of it if you ask me we're going to go all the way through looks like we're getting to the end I could go faster but I just want to make sure every page loads like that page almost didn't load and because it loaded a little late there's a possibility when I download these inverts PDF it might end up in the wrong order it might be out of order when we get to that page and of course we could write our script to look out for that make sure that page loaded okay and we're at the end now now last time we right-click and we said save all as HR and that will save all these images and everything that's loaded into one large file we're not going to do that this time we're going to go copy and we could do copy as curl but these are binary things and it's going to give you they'll give you a list of curl commands download everything but the binary stuff is such as images is not going to load properly so what we're going to do we're gonna say copy all as HR but that's not with content so I copied that it's in my clipboard now now I can open up a text editor and put that into a text file I'm just going to use cat I'm going to cat and put it into a file called one dot HR name the file does not matter now I can control shift V to paste that it'll take a minute to paste all in there once that is pasted all I have to do is hit control D and it will be now saved to that file so I'm basically just catting all this information that I'm pasting into the shell here it is a lot and now I said last time we had all the images as base 64 we had to find that information pull it out but what I can do now is I can say grep jpeg and I can grep that file for jpegs and you can see a list of them here and these look like the right ones we can see here that it says yearbook and we can see a page number but just to make sure you know we're not grabbing other jpegs I'm now going to grep that again just say yearbook your books and hopefully now I can double check but I'm just going to assume that these images that I'm grabbing now are URLs just two pages in the yearbook so at this point I want to cut out the excess information you can see that this is we have quotation marks here so I'm just say this is column one over here two three and this will be column four if we divide this up by quotation marks so we will say cut with a delimiter of quotation marks field four and when we do that we will get a list of all the images we can now pipe this into W get but again we would get all these question marks at the end there I'm sure is that clean easy way to remove all those I'm just going to renumber all the pages so what I'm going to do is here is I'm going to say let X equal 1000 and what that's saying is I'm creating a variable called X and that's an integer it's a number a whole number and now I can say W get or I want to do while loop while and there's actually other ways to do this that I've shown in the past where you can run things in parallel so it's downloading more than one image at a time which is something you might want to look into but I'm going to say read and I'll say URL then I'll say do W get dollar sign URL and I'll explain this in a moment dash capital O for W get most programs it's lower case O W get it's capital O if you don't do that it's going to yeah do weird things and we're gonna say dollar sign X dot jpeg and then we'll say colon let X plus plus done so what are we doing here again we're starting our script or command here our one liner and we're saying create a variable called X sets 1000 as an integer let is saying it's an integer so we can add to it we're gonna say look at this HRA file find all the lines that say jpeg and your book and then we're gonna cut those out and get this list and then we look through this while read we're gonna loop through this line by line and what are we going to do what we're gonna create a variable called URL for each of those lines and we're gonna say W get download that URL so download each one of these lines we're gonna say the output will be again if we don't give it an output it's gonna output it with this full name which is not the end of the world but then you want to clean that up after that we're gonna output to dollar sign jpeg which will be 1000 dot jpeg but then it will add one to jpeg so the next time it loops around will be 1001 1002 and that was just it's an easy way to name these files keeping them order without having to put placeholders zeros I've shown how to do that before this is just a quick and easy way obviously there's lots of ways to do what we're doing right now and some might be better than others this is just in my mind the quickest way that I've come up with for doing this that I remember that I know there are commands that can clean this up a little bit but I don't use them regularly so they're not in my head and there's like 240 some pages for this and as you can see they are downloading we're at 180 190 200 so again the only reason we're able to do this is because we've acknowledged that these images don't need a login if you need to log in to view the images we would have to create login credentials and all that this is just if that's the case then I would go the other route that I showed in the previous video where we just bulk download things of one file and extract it from there so again now I can click on any one of these pages and I can look through the pages as images and if I want to if I have image magic installed which you should when I say you should it's not it's fairly commonly installed if not you should have installed it's such a useful tool we're just gonna say convert all these jpegs to this is Naples high year book I think this was 1973 PDF and with that without giving any parameters it's basically going to put all these jpegs into the PDF I don't think it's going to recompress them at all so it should be let's see we have all together let's do it up here we'll say do you dash H we can see that there's a hundred fifty seven so if you count the images and the PDF it's 157 megs and if we were to list whoops out our yearbook it should be about half that which it is so there you go and now we can xdg dash open xdg will use whatever default application you have set for PDFs to open this and there you go there's page one and we can now go through all these pages this is our PDF of our yearbook and I'm pretty sure we got most of the pages yet that goes in order there and that's it now you can save this upload it do whatever you want with it you have individual images and PDFs for your liking so so much what we did before but instead of downloading everything to one file through the browser and then extracting images out of it we basically downloaded a list of the images and then downloaded those separately two different ways to do it again this is a better way I think if they if since we don't need login credentials to actually pull the images if you try to again click on this and say open a new tab and it wouldn't or and you did this in incognito mode and it wouldn't load that means you have to log in to access that image in that case I would go the route we went in the other video again there's lots of different ways to do things depending on the scenarios I hope you found this useful please visit films by Chris dot com that's Chris the K there's a link in the description and as always I hope that you have a great day


Welcome to the ninth annual THR award show, the most prestigious award show on the internet. It is shocking to think that 2023 is almost over. This year just went by so fast. But what we do on these award shows every year is we reflect back on the year. We look at some highlights, some lowlights and ultimately we vote on which ones were the most significant. Now the way that it works is I make four nominations in each category and I put it up to a vote on Twitter, YouTube and Patreon. So without further ado let's get to it because this year we're changing it up a little bit. We're doing all of the awards in one video because I don't think it's nice for me to bombard your feed with like four or five videos when you could just get all the results in one video. So the first category is the badass moment of 2023. Now there were a lot of things to consider even though the year overall I think was bad there were some highlights. Here are my nominations, Tucker Carlson getting fired from Fox News, also he was sent to cease and desist. On top of that just happened a couple of weeks ago, Henry Kissinger died. If that's not a highlight of the year nothing is. And there's also the ceasefire now protests and Makayla Kavanaugh's filibuster of a gender affirming care ban. Now before we get to the results here I want to give you some honorable mentions. Bethany Mandel humiliated herself while trying to describe Woke on Rising after she wrote a book about Woke, Mr. Beast defended his trans friend, Orcas decided to start destroying rich people's yachts, Kevin McCarthy was ousted and a GOP book ban in Utah led to the Bible being banned as well which was really really nice to see. Now we also had an incredible year when it comes to labor, the UAW strikes, the writers and actors strikes, all honorable mentions if not the most badass moments arguably alone. But when it comes to the results you all chose Tucker Carlson getting fired with Henry Kissinger dying as the runner up. Now the next category is the WTF moment of 2023. This is an overly broad category that usually contains things that are disturbing, sometimes just really silly and shocking, and also sometimes things that are really dreadful. Last year Roe v Wade getting overturned for example was the biggest WTF moment, but I think that this year given all the terrible things that have happened this category needs reform and I'll explain that in a moment. So the nominations are the East Palestine train derailment, Trump's multiple indictments, the transphobic bloodlight meltdown, and of course the Gaza genocide. And now obviously that is by far and away the biggest WTF moment for all of you, myself included. And I think that just looking at the severity of some of the nominations here, we really need to change this category altogether. We've kind of stuck with it for too long. I think there needs to be a WTF moment for less serious things and then there needs to be just the worst moment of the year for really horrible things, Supreme Court decisions, genocides, things like that. So going forward I absolutely intend on reforming this category, but for the most part the Gaza genocide is by far and away the most shocking WTF disturbing moment of the year and to even call it a moment is a bit of an understatement considering the fact that it's still happening. So yeah, it wasn't even close this time, you know, 80% on Twitter, 72% on YouTube, and 70% on Patreon with the transphobic Bud Light meltdowns coming in second place.  This is actually a new category, and it's for people who don't necessarily rise to the level of scumbag, but they still kind of deserve their own little award in and of itself. So this includes Marjorie Taylor Greene, Matt Walsh, Moms for Liberty and Richie Torres.  And so those are all the smaller categories, the TLDR categories, those are out of the way, but now we get to what you're all really here for. This is the scumbag award of 2023 and the MVP award of 2023.  My nominations are Ron DeSantis, Elon Musk, Benjamin Net Yahu, and Joe Biden. Now before we get to the results, I want to look at the precedent for this award. Last year's winner was the Supreme Court in the aftermath of them overturning Roe v. Wade, and the year before was Manchinema. And also Mitch McConnell and Donald Trump are our only two-time winners. Now on top of that, there were a lot of honorable mentions that includes Mike Johnson, Donald Trump, and you could make the case for any of these folks, right? But Mike Johnson just got into power. He's going to have much more time to actually get a nomination next year. Donald Trump, well, he's out of power currently, so he hasn't been able to do as much damage, even though he still is very much doing damage. So it's difficult, but I think that these are honorable mentions that should be mentioned. But regardless, let's go ahead and get to the results. The biggest scumbag of 2023, according to Humanist Report viewers, without question, is Benjamin Net Yahu, the Israeli Prime Minister, with 84% on Twitter, 71% on YouTube, and 83% on Patreon, all agreeing unequivocally that this man is the biggest scumbag of 2023. And the runner-up was Elon Musk. Well, let's get to some comments. Tim on Patreon says, BB is the obvious show-in, but honorable mention goes to DeSantis, in my opinion, for being so openly bigoted and enacting laws just to make people suffer. Adam on Patreon writes, all of them are fascists, but one is directly responsible for a genocide, period. Totally agree. Agent of Chaos on Patreon writes, Javier Millay, who recently won the Argentine presidential election, deserves a dishonorable mention. Absolutely agree with that. JBD8 on YouTube says, Netanyahu is the one who has proportionally caused the most death and suffering in the shortest amount of time, so my vote goes to him. Corin on YouTube writes, as a trans woman, it's extremely tempting to say DeSantis, as he more directly impacts me, but my vote has to go towards Netanyahu, because anyone directly responsible for a genocide has to earn the title. Yeah, SpongeBrain on YouTube writes, I would have said DeSantis if Netanyahu wasn't straight up doing a genocide. And now, it's the most important moment, the MVP award. Now, fun fact about the MVP award, it has been named the Bernie Sanders award because he has won literally every single year since this award show began. And that's not hyperbole. So he actually, spoiler alert, does not win this year. So we've got a bit of a combo breaker and a new MVP. And there's a reason for that. It's because Bernie wasn't nominated, so he didn't have the chance to win. And I never foresaw a year when I wouldn't nominate Bernie Sanders for being MVP, but I just couldn't do it because he refuses to call for a ceasefire. Still, he is better on that issue than other senators, but the bar is so low. And when you can't do the bare minimum, I can't say your MVP, you could do better.  But having said that though, we do have some new candidates. And my nominations include Zoe Zephyr, who was a trans lawmaker who spoke truth to power in her state and was punished for it. And there's also Makayla Kavanaugh in Nebraska, who led a months-long filibuster to stop a ban on gender-affirming care. And guess what?  She set a blueprint as to how other Democrats should respond to this type of legislation. On top of that, we have Sean Fain, UAW president. I don't think I need to explain why he deserves this title, but he is absolutely one of the most important people in the country right now with regard to the labor movement. And my last nomination is Rashida Tlaib. She is a Palestinian American who decided to speak truth to power, and she was also punished for it. And what she's saying is incredibly important. Now, before we get to the results, there's some honorable mentions that I want to go over here. The other is kind of like a duo, Justin Jones and Justin Pearson of Tennessee, who were expelled and then subsequently reelected after the GOP in their state accused them of doing an insurrection because they decided to stand in solidarity with gun rights activists or gun control activists rather. I think that they really showed, like Zoe Zephyr and Makayla Kavanaugh, that you can actually fight. You don't have to just lie down and get steamrolled just because you're in the minority. And I think that these are two leaders in this country that are going to do really big things. So they deserve an honorable mention. Other individuals that deserve honorable mentions, Tortuguita, Stop Cop City activist, Rafat Alarir, a Palestinian poet beloved by a lot of people who was killed by the IDF. Just horrible situation. So I think that these people deserve just their names to be brought up in any conversation about 2023 because they really did have a lasting impact. All of these people did. But with that being said, these are the results. The winner and the Humanist Report's MVP of 2023 is Rashida Tlaib with 67% on Twitter, 63% on YouTube and 55% on Patreon all agreeing she's this year's most valuable person and the runner up was Sean Fain with 33% on Twitter, 25% on YouTube and 34% on Patreon. Now let's get to the comments. Forrest Miller on Twitter had a hard time choosing this year's MVP but ultimately went with Rashida Tlaib? Yeah, this one was really tough. Alex Kawa on Twitter says MVP is undoubtedly Sean Fain. He has shown the true potential of what the new labor movement can and will accomplish in the years to come and so many union organizers will be inspired by him. Rashida Tlaib is a close second given her being a lone reasonable voice on Israel Mike on Patreon writes all are good but I will say Rashida, since even with APEC and their goons barreling down on her, she is doing all she can to find a ceasefire and hold Israel accountable for their actions if only the other Dems had a spine instead of jelly to stand against this right-wing government. Scott on YouTube writes I went with Fain as a UAW member. I know some people were disappointed with the contracts but you're not going to make up 40 years of concessions in one contract and it was a very good contract. Also what Fain represents moving forward could become the largest labor movement in history especially if he can pull off unionizing half of auto workers he is targeting. Zello on YouTube writes Zoe Zephyr I respect her so much being a trans woman myself. Joseph Oh on YouTube says I went with Rashida Tlaib because of her standing up against the genocide of the Palestinian people and not backing down even though her colleagues voted to censure her but I do want to add that Zoe Zephyr came in close second I would love to see more of her and hope she can expand her political career on a national level like a house or senate seat that'd be amazing. So there you have it another year another award show down if you didn't get a chance to participate in this comment down below let me know who's your MVP who is your scumbag what you think I should do to make the categories more representative of the events throughout the year let me know especially your MVP and scumbag because I do think that there is an argument to be made I personally support Rashida Tlaib but I think there is definitely an argument to be made for Sean Fain or someone else perhaps so comment down below and yeah I hope you all enjoy the show


Hey, I just heard about Amanda and I want to say to everyone who loved her to all of her family and friends How sorry I am for her loss No one deserves to be bullied No one earns it. No one asks for it. It isn't a rite of passage bullying has to stop every child everyone Needs to be able to feel safe at school And when we send our kids to school, we need to know that they're going to come home safe


Hi everyone, Joe for jasperjasevescasebreaks.com coming at you with 2018-2019 Panini Chronicles Basketball One Box Hanger Edition Random Team Break Number 12 And this officially sells out the mixer That'll be coming up in a separate video after this You can win five spots with a different dice roll at the very end So, but let's do the break itself first Big thanks to all of these lovely people here for trying Thank you, good luck There's all the teams right there, we're doing the break randomizer first After five times, one and a four One, two, three, five So after five times, we got Jeremy down to David Again, this is for the break first as always One and a four, five times for the teams Two After five times, we got the Pels down to the Sixers Remember this is 2018-2019 Sorry, Jeremy So here's the first half of the list right here Ryan with the Mavs, could be a Luca in here And Ryan Herald with the Hawks, could be a Trey Young In here, Ryan Shackleton, Ryan Herald Let's order these alphabetically by team It's officially closed up the trade window Let's print, let's rip Michael Porter Jr.'s pretty nice Arisa, Shamit, Myles, Svi, Trey Young Bruce Brown Jared Jackson Jr., Luca Donjage Look at all these cards in here Sexin's not bad either Another Trey Young Another Michael Porter Jr., another Trey Young Mo Bamba in the mix too That's pretty sweet, Trey Young, Ryan Herald Michael Porter Jr., Ryan Herald, Denver Nuggets Trey Young, Playoff Edition Ryan Herald Luca Donjage That's Ryan Shackleton, the Ryans are cleaning it up Memphis Grizzlies, Triple J Mike McCarthy This is Studio Version, Trey Young Ryan Herald And Ryan Herald with Denver Nuggets, Michael Porter Jr. There you go Not a bad hanger box there Let's see if this could also parlay itself into wins for the mixer spots So let's get everybody's names again We're going to re-roll it And it's going to be the top five after eight Top five after eight Good luck And eighth and final time after eight Thanks everyone for giving this a shot And congrats to the top five after eight Kenton, Steven, Eric Derek and Ryan Shackleton There you go Congrats to this group right here You're in the mixer, which is coming up in a separate video soon So check that out, JaspiesCaseRigs.com


And how do you know Christianity is the one true religion? Today we react to a video where ex-Christians are put in a room with current Christians and they have a discussion dialogue debate about these topics and more. I'm gonna react to it so you don't wanna miss this. As you guys know, this content is supported by you guys on Patreon, by the Patreon family. If you wanna get access to bonus videos or Discord and more and support what I'm doing and equipping people to follow Jesus daily, I'd encourage you to hit the link in my description and sign up today. It would be a huge blessing. Now on to the video. Christianity is the only true religion. For me, I think all religions teach you to do well, but Christianity is the only religion that teaches you can't do it without God. You can't do it without Jesus. So for me, I couldn't get out of my depression. I couldn't get out of my loneliness. I could only maintain. I needed something to save me, to pull me out of that. And so, you know, I grew up Buddhist, but with Christianity, I was able to really step out of that frame of thinking of I'm my own God, I have to take care of my own issues, and God was the one that helped me in everything.  Like what if you end up and all these things that you believed your whole life, they're just not true. And maybe you just believe them because your parents believe them or this was just where you grew up and that was the religion that most people believed. And we talked about this more and I came up with this, just this understanding in my own head. This is why I believe what I believe. All the other religions, okay? The truth is all the other religions tell you about how you can be God for yourself or you can please God or do enough where you can honor God. And it's all about works. It's all about being enough in and of yourself in one way or another. And I think the truth, I know that the truth that Christianity hits upon is that we are not good and we know that intrinsically. We know that we're not enough in and of ourselves. We know that we can't do enough to good to please God. And that is where Jesus comes in. That's what makes the gospel so beautiful. I've fallen so hard and I'm guilty before God and yet Jesus has come to forgive me of my sins that I could have new life in a relationship with God. That is an amazing truth. If we reflect on the aspect of the only true religion or the only true religion for me, it's a slippery slope. This kind of gets on the idea of subjective truth, right? You know, you can believe something. It can be true for you and yet something else that is contradictory can be completely true for me. When you abandon God, when you abandon God and his truth and his foundation for understanding the world basically, then yeah, you can be left with, this is true for you, this is true for me because truth means nothing. Nothing is really true. We're just evolved protoplasm. We are evolved stardust. There is no meaning. There is no worth. There is no right and wrong. There's no morality. There's no truth. And so then in that world, it would make sense that something could be completely true for you and something else could be completely true for me. But friend, that world is a world of absurdity. You know that logically speaking, two things that are contradictory cannot both be true. If I believe in God and I believe in Jesus and the gospel and that is true, then that is implications on you, even if you don't believe it.  My epiphany was like walking down Route 101 in Pennsylvania and thinking, oh my God, this idea behind Christianity is that everyone that doesn't just ascent believe in this one thing, they're gonna burn forever.  It is fulfilling to have a very black and white way of looking at the world, right? I mean, remember how great that felt. But also like my epiphany is, oh, there has to be more in the world in the universe than that. That can't be the end of it. Like that, I mean, that might be like an all-knowing God, but that's not an all-loving God. You know, can't be all. So what are we to make of the reality of hell? How can that even make sense? And I wrestled with this for quite some time. The idea that you could tell a lie, a little white lie even, right?  How does that even make sense? I heard this analogy one time that really helped me. Think about when you were younger, maybe you had a sibling. If you lied to that sibling, you told the lie to them. What would be the consequences of that? Nothing, really. They might be a little bit angry at you, but they can't do anything to you.  Man, you could be grounded. The consequences could be more significant. You lie to a police officer. Man, you could be in big trouble. You lie to a judge. All of a sudden, you're guilty of perjury and you could go to jail.  It was their standing.   That seems like a wrong thing, a mean thing to do. But then you think about it, would a good judge, God is a judge, would a good judge let a criminal go? Like if you had some crime that was committed against you or some of you that you loved and the judge was looking at the person, the perpetrator and said, you know what, I love you all so much that I'm just gonna let the criminal go. I'm gonna let him go off scot-free. Would that be a loving thing to do? No, not at all. A loving good judge would make sure that justice is executed. But that's the beauty of the gospel is that in God's justice, he sent Jesus, that he took the punishment that we deserve for our sin. You really need to focus on whether you are going to theologically accept the Bible as the absolute document of truth. What are you gonna cherry pick from it? What are you gonna accept as, oh, this was just a historical thing. And the kind of sandwich you're saying. When Jesus said, you know, you can't change an iota here. It's hard because like I feel like I'm hyper-liberal too and stuff because I'm like, oomph, oomph, oomph. You know what I mean? Market. But then I know right. But then it's like, it's kind of true to a degree. Like sometimes I honestly feel like I cherry pick from the Bible. Like I'm like, they still eat shellfish so I could be with a man. You know what I mean? It's so tough because it's like I only know how to love a man as much as I would love to be what normal is. This is just who I am. He knows that, okay, there's some disconnect here. And yet I still want to call myself a Christian but I don't want to let go of this side of me. And I think in some ways we all kind of do this, right? We all kind of, you know, cherry pick things in the Bible and we say, hey, I like this but I'm gonna push this to the side because I still want to call myself a Christian but I don't want to submit this aspect of my life to Jesus. And part of what it looks like to be sanctified is to let those things go to have God infiltrate your life, right? Permiate your heart and take those things away from you. So now it's not, man, I'm trying to hide this thing from God so he doesn't take it from me because I love it so much. It's God take these things from me so I can be free to love you holy and find my whole satisfaction in you. It doesn't sound like this guy's even taking the first step of understanding his sin before God because he's clinging so tightly onto these things that he thinks will fulfill him, his identity. I can only love a man. That's his presupposition. I can only be the way that I am. And yet he's discounting how God can transform his heart and also he's disregarding what God has said in his word in substitute for his own desires. If you look at the God that's portrayed in the Old Testament and the New Testament, it looks a lot more like us than it looks like an all-knowing, all-good kind of situation. You're like, oh yeah, this totally came to get people to cooperate with the power. You know, focus on power. It's all about vengeance. These are human qualities. Interesting, interesting.  Folks will look at the Old Testament. I hear this all the time. They look at the Old Testament and how God called the Israelites to wipe out certain people groups and he said, you know, don't leave anything left. Basically wipe them all out and they say, how could a good God do this? How could a righteous God do this? This seems like a human behavior, human vengeance. This is their perspective as well. So what, how do we make sense of this? Well, firstly, we need to understand where morality comes from. The idea that we can throw moral accusations against God is just totally counter to our foundation. It's like saying that the bridge doesn't exist that we're standing upon. We are using moral language. Well, disposing of the moral foundation for how we understand right and wrong in general, right? Cause otherwise it is just your opinion. If you're gonna throw moral accusations against God, God, this is messed up. How could you do this? I don't agree with this. Where are you getting your standard from? Okay, because if you're gonna disregard God and his standard and how in the image of God that has been placed within you, then the truth is we're all just animals. We're just all animals. There's no ought. There's no right. There's no wrong. So why would that be a bad thing? Why would be a bad thing to kill anybody? Why would it be? And you're saying, oh, well, I just know in my heart, right? That's where I get my morality from. Friend, that's not a foundation. That's your opinion. Well, maybe you say, well, this seems counter to even what the Bible teaches. The truth is, is that God can execute justice in the way that he sees fit. And according to the Bible, we've all sinned. We've all fallen short of the glory of God. And we are the wages of sin is death. So truthfully, right here and right now without Jesus, you are deserving of death.  So the fact that God chose to pour out his wrath on a particular people that he didn't withhold it for that time, that was completely his right to do. And it's tough to even realistically do that every day. Like every day I sin because I kiss this man that I love.  You know what I mean? It's tough feeling like everything that you do that's just an everyday thing. And it has zero to do with how you treat people. At the end of the day, the rainbow that it gets to and stuff and part of gold is that Jesus Christ is all loving. He loves everybody.  Hey, don't sweat it. Found.  Don't let the world tell you this. And but I believe that in some way, the Bible is telling you that. Let's take a closer look at what he's saying here. He's saying that, you know, push away all the stuff that the Bible says, basically and focus on Jesus' message. Jesus' message was he loves everyone. He loves everyone and that the world will tell you that you can't be a good person by doing these different things, but you can be a good person. Friend, that is just a completely misreading of Jesus and what he was saying. You think about the woman caught in adultery, okay? She was partaking in this sin, obviously, but everyone was casting shame and judgment upon her, ready to stone her. And Jesus comes in and he says, stop. If you haven't sinned, then cast the first stone. All of them walked away, right? But then what did he say to the woman? He says, hey, you know, I know the world will see what you're doing here is something bad, but I just wanna let you know that what you're doing here is good and it's noble and you can still be a good person by doing it. That's not what Jesus said. He said, neither I condemn you, but go and sin no more. Go and sin no more. That was Jesus' message. It was bringing love and compassion and grace. Absolutely, but it was truth.   So it wasn't, hey, you can be a good person and don't listen to the world and saying that you can't do these things and still be a good person because I think you can. It was Jesus saying, you're not a good person. You're not a good person. You don't have what it takes, but I am enough for you. I am the way, the truth and the life. If you believe in me, you'll have eternal life. Praying to organize all of the Bible and make it make sense, that's gonna fail. Not very clear whether it's telling us to do good things or do bad things. It has kind of a combination of both in there. Once again, this is the misunderstanding of prescriptive versus descriptive.  Friend, it's pretty self-explanatory in terms of what is a bad thing that's just describing a story of something that somebody did versus the prescript of what you should do and the commandments of, okay, this is how you love one another. This is how you honor one another. This is how you deal with different situations that you'll encounter. Those things are pretty clear, but if you're looking into the Bible to take everything as, I guess this is what I should do.  That's not true.  It doesn't mean that you should do everything that they're doing because they probably sin a lot. You can be gay and Christian. Well, this horror, obviously, and stuff, I'm a big fruitcake. I bartend in nightlife. I go-go dance. I do adult content. I love it. I love having sex with men, which almost sounds bad now that I'm saying it out loud. It's amazing. But I still love the Bible. I treat people with respect. I go to confession. I do all these things. I love my LGBTQIA community. All these things that you're doing, they're not gonna make up for your sin. It's like, you know, approaching the judge saying, hey, judge, I walked all these old ladies across the street. I know I come into these crimes that these things that were counter to the law of the land but I walked all these old ladies across the street and I gave to the food bank and I'm really a nice guy.  And so I'm still gonna have to execute justice. And I want this fellow to realize that. I want you to realize that if you haven't already come to Jesus and understood that Jesus took that punishment for your sins, that though that weight and that guilt hangs over you, it doesn't need to anymore because you have a substitute in God. I fear death. I wish I didn't fear death, but I do.  Like you are gonna burn, burn, burn.  But what if like the pastors in the back of my mind that I've gone through in youth group, I'm like, but what if it is? But I refuse to live like fear based and just believe in God because I'm scared. Like that's not living to me and I can't like force myself to believe in it. Here's the truth. The Bible says that it is appointed for a man once to die and then to face the judgment without God. Yes, that is a fearful place to be.  All those things that we've ever thought, all those things we've ever done, it makes sense that we would experience fear.   That is my heart for her and my heart for all those folks they call themselves ex-Christians. I hope you enjoyed this video and got something from it. If you did, please subscribe because I'm putting out new videos every single day this week and I give this video a like if you enjoyed it as well. Until next time, God bless.