Web cookies (also called HTTP cookies, browser cookies, or simply cookies) are small pieces of data that websites store on your device (computer, phone, etc.) through your web browser. They are used to remember information about you and your interactions with the site.
Purpose of Cookies:
Session Management:
Keeping you logged in
Remembering items in a shopping cart
Saving language or theme preferences
Personalization:
Tailoring content or ads based on your previous activity
Tracking & Analytics:
Monitoring browsing behavior for analytics or marketing purposes
Types of Cookies:
Session Cookies:
Temporary; deleted when you close your browser
Used for things like keeping you logged in during a single session
Persistent Cookies:
Stored on your device until they expire or are manually deleted
Used for remembering login credentials, settings, etc.
First-Party Cookies:
Set by the website you're visiting directly
Third-Party Cookies:
Set by other domains (usually advertisers) embedded in the website
Commonly used for tracking across multiple sites
Authentication cookies are a special type of web cookie used to identify and verify a user after they log in to a website or web application.
What They Do:
Once you log in to a site, the server creates an authentication cookie and sends it to your browser. This cookie:
Proves to the website that you're logged in
Prevents you from having to log in again on every page you visit
Can persist across sessions if you select "Remember me"
What's Inside an Authentication Cookie?
Typically, it contains:
A unique session ID (not your actual password)
Optional metadata (e.g., expiration time, security flags)
Analytics cookies are cookies used to collect data about how visitors interact with a website. Their primary purpose is to help website owners understand and improve user experience by analyzing things like:
How users navigate the site
Which pages are most/least visited
How long users stay on each page
What device, browser, or location the user is from
What They Track:
Some examples of data analytics cookies may collect:
Page views and time spent on pages
Click paths (how users move from page to page)
Bounce rate (users who leave without interacting)
User demographics (location, language, device)
Referring websites (how users arrived at the site)
Here’s how you can disable cookies in common browsers:
1. Google Chrome
Open Chrome and click the three vertical dots in the top-right corner.
Go to Settings > Privacy and security > Cookies and other site data.
Choose your preferred option:
Block all cookies (not recommended, can break most websites).
Block third-party cookies (can block ads and tracking cookies).
2. Mozilla Firefox
Open Firefox and click the three horizontal lines in the top-right corner.
Go to Settings > Privacy & Security.
Under the Enhanced Tracking Protection section, choose Strict to block most cookies or Custom to manually choose which cookies to block.
3. Safari
Open Safari and click Safari in the top-left corner of the screen.
Go to Preferences > Privacy.
Check Block all cookies to stop all cookies, or select options to block third-party cookies.
4. Microsoft Edge
Open Edge and click the three horizontal dots in the top-right corner.
Go to Settings > Privacy, search, and services > Cookies and site permissions.
Select your cookie settings from there, including blocking all cookies or blocking third-party cookies.
5. On Mobile (iOS/Android)
For Safari on iOS: Go to Settings > Safari > Privacy & Security > Block All Cookies.
For Chrome on Android: Open the app, tap the three dots, go to Settings > Privacy and security > Cookies.
Be Aware:
Disabling cookies can make your online experience more difficult. Some websites may not load properly, or you may be logged out frequently. Also, certain features may not work as expected.
Please find assignment #4 attached here: MCB_5472_Assignment_4. This week we will be starting to work with command line BLAST, using it to answer some interesting questions about our genomes from assignment #3. We will also be continuing to develop our perl skills, especially using arrays to parse the BLAST output and hashes to tabulate it into something useful. This assignment is due before class on Wednesday Feb 19/14.
The corresponding lecture can be found here: MCB5472_Assignment_4_lecture_Feb-12-14 (pptx) MCB5472_Assignment_4_lecture_Feb-12-14 (pdf)
If you also have trouble using the -outfmt 7 flag, here is the fact I just found out: If you just copy the syntax mentioned in the assignment notes, it probably won’t work because the double quotation marks are not the correct form for terminal. You’ll only need to type the quotation marks by yourself and copy the other words, and then you get the results!
Thanks Peihua!
Jonathan
Hi Dr. Klassen,
For the second part of the assignment, we do blast agains the genome itself to find paralogs. When we are analyzing the results, shall we get rid of all the blast results with 100% identity, or shall we just remove those pairs whose query id and subject id are the same? In another words, does 100% identity necessarily suggests that the two genes being blasted are the same?
Good question Peihua. A sequence will always have 100% identity to itself but potentially not over its entire length because of low complexity masking. Also consider: a sequence blasted to itself will have 100% identity but the opposite logic will not always be true, i.e., different sequences can also be 100% identical. Comparing names is safer for this reason.
Hello guys,
For the second part of the assignment, I am having trouble setting the evalue and the minimum alignment length requirement to 70%. Do I specify the evalue by typing in the command line -evalue 1e^-5? When I did this, I got an error saying command not found. I know this sounds like a trivial question, but the struggle is real. Any help is appreciated!
No question too trivial! I believe the problem is that it should be “1e-5” instead of “1e^-5”. Sorry, no way for me to test this right now.
When I specify an e-vaulue cutoff i usually put it as a decimal “.00001” and this works for me. Although, it might be harder to use if you were trying to do 1e^-30 or something else where you would need a lot of zeros.
Thanks guys! I will try these suggestions tomorrow and report my results!
Hi yall,
I’ve hit a bit of a wall on the second part of the assignment. So far I’ve been unable to get my BLAST results into a format that I can work with. At first I figured I would need to store each line of my results in an array and then split each of those lines by “\t”, but I was unable to find a way to do this. I then noticed the suggested “@blastline = split $line, “\t”” and attempted to use this while my results file was being read line by line. I messed around with this code (for longer than I’d like to admit) but as of yet, the program has either returned a tab (literally a blank space) or an fun error saying:
Invalid [] range “L-2” in regex; marked by <– HERE in m/# Query: gi|410480140|ref|YP_006767686.1| chromosomal replication initiation protein [Escherichia coli O104:H4 str. 2009EL-2 <– HERE 050]
/ at jamesmcg_4pt2.pl line 10, line 2.
Anyone have any luck getting their results into “tabular output format”? Thanks!
James, it looks to me like something is weird with the quotation marks. Try typing in the command that I gave you instead of copying (if that is what you did). Remember that things get weird coming from word processors, powerpoint and pdfs. It looks like perl is trying to interpret the match as a regular expression, not text. I think the quotation marks are forcing it this way. Hope that helps, else let me know.
Hi Prof. Klassen,
Oh yea, that might be because I put quotation marks around the code in my message. I stripped my code down and tired typing the command in again and got the same error. When I use the following code, adding the bit about the line starting with “gi”, the program prints only a tab.
while ($line = ){
if ($line =~ /^gi/){
@blastline = split $line, “\t”;
}
else{
print “”;
}
}
print @blastline;
Maybe I’m missing something obvious? Is your code meant to be used at this step or should I incorporate it into some sort of loop? Thanks!
Actually, I’ve already figured out how to store my BLAST results in a big array in which each element was created by splitting with “\t”. I thought we needed to keep the results organized in lines however, so I dismissed this bit of code, figuring it wasn’t very useful. Reevaluating it though, it seems this may be a useful first step way to go about things. I’ll give it a shot in the morning. Thanks for your time!
Ack! Error in my presentation! Should read: @blastline = split “\t”, $line; I have corrected this in the presentation now – I’m very sorry!
You have another problem though: because you redefine @blastline every time you go through the loop, all that’s kept is the last line. You probably want to process this array each time through the loop.
How do we specify the minimum alignment length to be 70%?
Nevermind, I think I figured it out.
Oh wow, I knew it had to be somethings silly. Anyway, what I hope is a good idea came to me right before I fell asleep last night, so I’m going to give it a shot. Thanks!
So when BLASTing the fnn file against it self I got a whole but of the follow error:
Warning: (1431.1) CFastaReader: Ignoring invalid residue & at line 75086, position 0
The character after residue varied. Will this effect my results?
Thanks!
Had to ask SeqAnswers.com this one. Looks like you somehow have an “&” character in your fasta file that BLAST does not like. I suggest that you try the “tail” command in the terminal to check the bottom few lines of the file. You may have to download it again – maybe the download was interrupted before complete? Really I’m just guessing here – bottom line is that it’s probably corrupted somehow.
Yep, there’s some ugliness down there. For example:
>gi|410485110|ref|NC_018651.1|:c108169-107834 Escherichia coli O104:H4 str. 2009EL-2050 plasmid p09EL50, complete sequence
Luckily, I think its just in the plasmids. I’ll try downloading them differently and running everything again. Thanks for the help.
Wow, weird, the beginning of that line appeared completely differently when I pasted it from the cluster into this text window…
hey guys,
If you also have trouble using the -outfmt 7 flag, here is the fact I just found out: If you just copy the syntax mentioned in the assignment notes, it probably won’t work because the double quotation marks are not the correct form for terminal. You’ll only need to type the quotation marks by yourself and copy the other words, and then you get the results!
Thanks Peihua!
Jonathan
Hi Dr. Klassen,
For the second part of the assignment, we do blast agains the genome itself to find paralogs. When we are analyzing the results, shall we get rid of all the blast results with 100% identity, or shall we just remove those pairs whose query id and subject id are the same? In another words, does 100% identity necessarily suggests that the two genes being blasted are the same?
Good question Peihua. A sequence will always have 100% identity to itself but potentially not over its entire length because of low complexity masking. Also consider: a sequence blasted to itself will have 100% identity but the opposite logic will not always be true, i.e., different sequences can also be 100% identical. Comparing names is safer for this reason.
Hello guys,
For the second part of the assignment, I am having trouble setting the evalue and the minimum alignment length requirement to 70%. Do I specify the evalue by typing in the command line -evalue 1e^-5? When I did this, I got an error saying command not found. I know this sounds like a trivial question, but the struggle is real. Any help is appreciated!
No question too trivial! I believe the problem is that it should be “1e-5” instead of “1e^-5”. Sorry, no way for me to test this right now.
When I specify an e-vaulue cutoff i usually put it as a decimal “.00001” and this works for me. Although, it might be harder to use if you were trying to do 1e^-30 or something else where you would need a lot of zeros.
Thanks guys! I will try these suggestions tomorrow and report my results!
Hi yall,
I’ve hit a bit of a wall on the second part of the assignment. So far I’ve been unable to get my BLAST results into a format that I can work with. At first I figured I would need to store each line of my results in an array and then split each of those lines by “\t”, but I was unable to find a way to do this. I then noticed the suggested “@blastline = split $line, “\t”” and attempted to use this while my results file was being read line by line. I messed around with this code (for longer than I’d like to admit) but as of yet, the program has either returned a tab (literally a blank space) or an fun error saying:
Invalid [] range “L-2” in regex; marked by <– HERE in m/# Query: gi|410480140|ref|YP_006767686.1| chromosomal replication initiation protein [Escherichia coli O104:H4 str. 2009EL-2 <– HERE 050]
/ at jamesmcg_4pt2.pl line 10, line 2.
Anyone have any luck getting their results into “tabular output format”? Thanks!
James, it looks to me like something is weird with the quotation marks. Try typing in the command that I gave you instead of copying (if that is what you did). Remember that things get weird coming from word processors, powerpoint and pdfs. It looks like perl is trying to interpret the match as a regular expression, not text. I think the quotation marks are forcing it this way. Hope that helps, else let me know.
Hi Prof. Klassen,
Oh yea, that might be because I put quotation marks around the code in my message. I stripped my code down and tired typing the command in again and got the same error. When I use the following code, adding the bit about the line starting with “gi”, the program prints only a tab.
while ($line = ){
if ($line =~ /^gi/){
@blastline = split $line, “\t”;
}
else{
print “”;
}
}
print @blastline;
Maybe I’m missing something obvious? Is your code meant to be used at this step or should I incorporate it into some sort of loop? Thanks!
Actually, I’ve already figured out how to store my BLAST results in a big array in which each element was created by splitting with “\t”. I thought we needed to keep the results organized in lines however, so I dismissed this bit of code, figuring it wasn’t very useful. Reevaluating it though, it seems this may be a useful first step way to go about things. I’ll give it a shot in the morning. Thanks for your time!
Ack! Error in my presentation! Should read: @blastline = split “\t”, $line; I have corrected this in the presentation now – I’m very sorry!
You have another problem though: because you redefine @blastline every time you go through the loop, all that’s kept is the last line. You probably want to process this array each time through the loop.
How do we specify the minimum alignment length to be 70%?
Nevermind, I think I figured it out.
Oh wow, I knew it had to be somethings silly. Anyway, what I hope is a good idea came to me right before I fell asleep last night, so I’m going to give it a shot. Thanks!
Hey yall,
Oops, accidentally hit tab there. Anyway, if anyone is having trouble print the final, tabulated hash table in a way that makes sense, Data::Dumper is useful. I found out about it here:
http://stackoverflow.com/questions/1162245/how-can-i-print-the-contents-of-a-hash-in-perl
So when BLASTing the fnn file against it self I got a whole but of the follow error:
Warning: (1431.1) CFastaReader: Ignoring invalid residue & at line 75086, position 0
The character after residue varied. Will this effect my results?
Thanks!
Had to ask SeqAnswers.com this one. Looks like you somehow have an “&” character in your fasta file that BLAST does not like. I suggest that you try the “tail” command in the terminal to check the bottom few lines of the file. You may have to download it again – maybe the download was interrupted before complete? Really I’m just guessing here – bottom line is that it’s probably corrupted somehow.
Yep, there’s some ugliness down there. For example:
>gi|410485110|ref|NC_018651.1|:c108169-107834 Escherichia coli O104:H4 str. 2009EL-2050 plasmid p09EL50, complete sequence
Luckily, I think its just in the plasmids. I’ll try downloading them differently and running everything again. Thanks for the help.
Wow, weird, the beginning of that line appeared completely differently when I pasted it from the cluster into this text window…
Fixed it!
Huzzah!