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.
I had some trouble getting the hmmscan command to work. At first, it seemed to be a problem with my muscle alignment– I got an error that said something like “missing # STOCKHOLM header” which meant that hmmscan was not properly detecting the format of the muscle alignment. That seemed to resolve on its own and I’m not sure why. (I did try changing the muscle alignment format to a couple of different things before going back to the default.)
The second problem I had was with getting hmmscan to properly put the output in my out file. Here is the command I ended up using:
“hmmscan -o /dev/null –tblout hmmscan.out both.hmm drafts.faa”
where the -o option dumps the on-screen output to the garbage because I didn’t want to deal with it while testing my loop, and –tblout directions the output to my hmmscan.out file. This worked like a charm. One could also direct the -o option to some other file (maybe “hmmscan.screen.out”) if one wanted to be able to look at the human-readable version of the output.
Oops, that was totally a known bug. Should have checked my email first. 🙂
Hi Cera – Peihua also brought that error to my attention yesterday. Turns out the cluster had an older version of HMMER3 installed that did not detect the input file format properly. I worked with the Biotech cluster folks and this was fixed as of ~9pm last night. If you are still getting this error please let me know and I will investigate further. They also requested that you use a –cores 1 flag when running jobs on the cluster because their new version multithreads by default and this can cause trouble of the cluster under high usage.
Thanks for pointing out my syntax error for hmmscan: I should have had “–tblout” instead of “-o”. I have uploaded the correction.
Hey guys,
I don’t know how far along you guys are with assignment but one of things that threw me off while running my script on cluster is that seqret split my files in to yp.acessionnumber.fasta. When I ran my script on cluster, it told me it couldn’t find my files and this was because of lowercase “yp” and my script did not have file names with the fasta extension. Shout out to Professor Klassen who figured this out!
While running my perl script, for steps 6-8, I receive this error:
“Error: Looks like Becca_both.hmm is already pressed (.h3i file present, anyway):
Delete old hmmpress indices first”
I first tried running the script with die, and it works successfully, but when I try to run the script against all the files that error shows up ~2 minutes into the run.
My script is as follows:
foreach my $filename (@table) {
system “cat $file1 $file2 > Becca_both.faa”;
system “muscle -in Becca_both.faa -out Becca_both.muscle.faa”;
system “hmmbuild Becca_both.hmm Becca_both.muscle.faa”;
system “hmmpress Becca_both.hmm”;
system “hmmscan -o/dev/null –tblout Becca_hmmscan.out Becca_both.hmm Drafts.faa”;
}
If I delete .h3i follow as it recommends, the script will continue to run, but I feel as if I shouldn’t have to be sitting here deleting the file as it appears. Also if I run the script using die, and then re-run without having deleted the h3i file, the same error message will appear.
Should I insert something into my loop to delete the file at the end of each run?
Deleting the files each time is exactly what you should do. i.e., “system rm *.h3*”
Hi yall,
So we are supposed to calculate the number of hits present in each draft genome? I could see how to do this, except the table generated with hmmscan isn’t returning any info on the genome the hit subject came from. For example:
I guess the fourth spot is suppose to contain the accession number…but it doesn’t. Has anyone else run into this problem? Thanks.
Hi James – The question does not specify “per genome” so you don’t need to worry about this. Just count the number of hits that you get above whatever e-value threshold you decide to use to consider the protein an ortholog.
FYI probably the simplest way to count orthologs in an individual genome would be to run the hmmscan vs. one genome at a time.
Ah, yes, that seems nicer. Thank you!
I’m having some trouble getting my code to parse through the hmmscan output file. Psuedocode looks something like this:
open INFILE RBH.out
while my $line = INFILE {
Regular expressions
system (Step 5)
system (Step 6)
system (Step 7)
system (Step 8) which outputs table.out file
while my $line = table.out {
count orthologs }
}
How do I get my second while loop to open table.out each time it goes through the loop? Stating it as an infile doesn’t work because it doesn’t get made until I’m inside the while loop.
you could always define it within the loop or create another loop within the loop
How simple. Thanks Rob!
Alicia, also be careful because you used $line twice for two different things. That could bite you if you are not careful. You might want to consider also opening table.out as a separate infile to parse it – as written I don’t think that it will work.
So… I’m getting the same number of orthologs in the draft genomes for every single sequence. My both.faa files change each time through the loop, but the table output looks completely identical every single time. In the table file there’s no accession number or anything to identify the sequence.
Anyone else having this problem?
Alicia, did you try manually deleting all of the intermediate output files and seeing what happens? It is possible that the one of the intermediate steps (e.g., hmmbuild) is not working but because there are .hmm output files from a previous iteration the script still runs.
Another way to troubleshoot is to run a few loop iterations while keeping all of the intermediate output files. The simplest way is to include a $counter variable that increments each time through the loop. Then give all of your intermediate files names like “both.$counter.hmm”. You can include a line like “die if ($counter == 10)” to stop after the tenth time through the loop.
The same principle applies as before: always know everything that your script is doing. If in doubt, print everything – including your intermediate output files.
Hey guys!
Just wondering as to how long some of your scripts are running. I’m up to 13 hours, and hopefully done soon. Anyone around there?
Seems a bit long to me. Are you getting the output that you expect? Another possibility is that everyone is overloading the cluster, having all left the assignment until the last minute. Or those darn EEB folks are at their Bayesian analyses again! 😉
Yup, I’m getting the output I expect. But I am running a foreach loop, which at this point I think might’ve been a mistake. Oh well. I’ll just blame EEB, and not my script.
Ha!
Alright so I ran my script a number a times and a number of ways, but my count in my second while loop always comes back adding to my previous number. My script reads like this:
my $count = 0;
while ( $filecount = ) {
$filecount =~ /^both(.*)\|\s[-]\s+(0|\d+[.]\d+e[-+]\d+)\s(.+)/;
my $evalue = $2;
if ($evalue <= evalue threshold) {
$count ++;
Then my output comes back something like –
14
28
42
56
70
84
98
Any ideas on why my $count will not reinitialize as a zero every loop through?
Thanks!
No idea, really. I recommend printing $count both every time through the central loop and every time through the hmmscan parsing loop, including some marker that you are at that part of the code (e.g., print “loop starts\n”; print “in the if\n” etc.). That’s the best way to tell what exactly is changing each time and why it is not being initialized. Let me know what happens and I’ll try to help further.
So when I ran it and asked to print in the locations you mentioned –
It printed something like the following-
loop starts
loop starts
loop starts
loop start ……
14
28
142 …….
So according to that you never actually enter your “if” statement. But count increments still so your print statements either can’t be in the right place or $count is being added too elsewhere in your script. I guess you could be also printing something other than $count, conceivably.
Also FYI perl can accept evalues as numbers, so you don’t necessarily need the fancy regular expression.
Also also FYI a handier way to deal with this file more like NCBI’s output would be @array = split /\s+/, $filecount; your evalue would then be $array[2], I think from your regex.
I had some trouble getting the hmmscan command to work. At first, it seemed to be a problem with my muscle alignment– I got an error that said something like “missing # STOCKHOLM header” which meant that hmmscan was not properly detecting the format of the muscle alignment. That seemed to resolve on its own and I’m not sure why. (I did try changing the muscle alignment format to a couple of different things before going back to the default.)
The second problem I had was with getting hmmscan to properly put the output in my out file. Here is the command I ended up using:
“hmmscan -o /dev/null –tblout hmmscan.out both.hmm drafts.faa”
where the -o option dumps the on-screen output to the garbage because I didn’t want to deal with it while testing my loop, and –tblout directions the output to my hmmscan.out file. This worked like a charm. One could also direct the -o option to some other file (maybe “hmmscan.screen.out”) if one wanted to be able to look at the human-readable version of the output.
Oops, that was totally a known bug. Should have checked my email first. 🙂
Hi Cera – Peihua also brought that error to my attention yesterday. Turns out the cluster had an older version of HMMER3 installed that did not detect the input file format properly. I worked with the Biotech cluster folks and this was fixed as of ~9pm last night. If you are still getting this error please let me know and I will investigate further. They also requested that you use a –cores 1 flag when running jobs on the cluster because their new version multithreads by default and this can cause trouble of the cluster under high usage.
Thanks for pointing out my syntax error for hmmscan: I should have had “–tblout” instead of “-o”. I have uploaded the correction.
Hey guys,
I don’t know how far along you guys are with assignment but one of things that threw me off while running my script on cluster is that seqret split my files in to yp.acessionnumber.fasta. When I ran my script on cluster, it told me it couldn’t find my files and this was because of lowercase “yp” and my script did not have file names with the fasta extension. Shout out to Professor Klassen who figured this out!
While running my perl script, for steps 6-8, I receive this error:
“Error: Looks like Becca_both.hmm is already pressed (.h3i file present, anyway):
Delete old hmmpress indices first”
I first tried running the script with die, and it works successfully, but when I try to run the script against all the files that error shows up ~2 minutes into the run.
My script is as follows:
foreach my $filename (@table) {
system “cat $file1 $file2 > Becca_both.faa”;
system “muscle -in Becca_both.faa -out Becca_both.muscle.faa”;
system “hmmbuild Becca_both.hmm Becca_both.muscle.faa”;
system “hmmpress Becca_both.hmm”;
system “hmmscan -o/dev/null –tblout Becca_hmmscan.out Becca_both.hmm Drafts.faa”;
}
If I delete .h3i follow as it recommends, the script will continue to run, but I feel as if I shouldn’t have to be sitting here deleting the file as it appears. Also if I run the script using die, and then re-run without having deleted the h3i file, the same error message will appear.
Should I insert something into my loop to delete the file at the end of each run?
Deleting the files each time is exactly what you should do. i.e., “system rm *.h3*”
Hi yall,
So we are supposed to calculate the number of hits present in each draft genome? I could see how to do this, except the table generated with hmmscan isn’t returning any info on the genome the hit subject came from. For example:
mult.muscle – gi|429772785|ref|ZP_19304803.1| – 1.4e-12 33.3 8.3 1.4e-12 33.3 8.3 2.5 2 1 0 2 2 2 1 –
I guess the fourth spot is suppose to contain the accession number…but it doesn’t. Has anyone else run into this problem? Thanks.
Hi James – The question does not specify “per genome” so you don’t need to worry about this. Just count the number of hits that you get above whatever e-value threshold you decide to use to consider the protein an ortholog.
FYI probably the simplest way to count orthologs in an individual genome would be to run the hmmscan vs. one genome at a time.
Ah, yes, that seems nicer. Thank you!
I’m having some trouble getting my code to parse through the hmmscan output file. Psuedocode looks something like this:
open INFILE RBH.out
while my $line = INFILE {
Regular expressions
system (Step 5)
system (Step 6)
system (Step 7)
system (Step 8) which outputs table.out file
while my $line = table.out {
count orthologs }
}
How do I get my second while loop to open table.out each time it goes through the loop? Stating it as an infile doesn’t work because it doesn’t get made until I’m inside the while loop.
you could always define it within the loop or create another loop within the loop
How simple. Thanks Rob!
Alicia, also be careful because you used $line twice for two different things. That could bite you if you are not careful. You might want to consider also opening table.out as a separate infile to parse it – as written I don’t think that it will work.
So… I’m getting the same number of orthologs in the draft genomes for every single sequence. My both.faa files change each time through the loop, but the table output looks completely identical every single time. In the table file there’s no accession number or anything to identify the sequence.
Anyone else having this problem?
Alicia, did you try manually deleting all of the intermediate output files and seeing what happens? It is possible that the one of the intermediate steps (e.g., hmmbuild) is not working but because there are .hmm output files from a previous iteration the script still runs.
Another way to troubleshoot is to run a few loop iterations while keeping all of the intermediate output files. The simplest way is to include a $counter variable that increments each time through the loop. Then give all of your intermediate files names like “both.$counter.hmm”. You can include a line like “die if ($counter == 10)” to stop after the tenth time through the loop.
The same principle applies as before: always know everything that your script is doing. If in doubt, print everything – including your intermediate output files.
Hey guys!
Just wondering as to how long some of your scripts are running. I’m up to 13 hours, and hopefully done soon. Anyone around there?
Seems a bit long to me. Are you getting the output that you expect? Another possibility is that everyone is overloading the cluster, having all left the assignment until the last minute. Or those darn EEB folks are at their Bayesian analyses again! 😉
Yup, I’m getting the output I expect. But I am running a foreach loop, which at this point I think might’ve been a mistake. Oh well. I’ll just blame EEB, and not my script.
Ha!
Alright so I ran my script a number a times and a number of ways, but my count in my second while loop always comes back adding to my previous number. My script reads like this:
my $count = 0;
while ( $filecount = ) {
$filecount =~ /^both(.*)\|\s[-]\s+(0|\d+[.]\d+e[-+]\d+)\s(.+)/;
my $evalue = $2;
if ($evalue <= evalue threshold) {
$count ++;
Then my output comes back something like –
14
28
42
56
70
84
98
Any ideas on why my $count will not reinitialize as a zero every loop through?
Thanks!
No idea, really. I recommend printing $count both every time through the central loop and every time through the hmmscan parsing loop, including some marker that you are at that part of the code (e.g., print “loop starts\n”; print “in the if\n” etc.). That’s the best way to tell what exactly is changing each time and why it is not being initialized. Let me know what happens and I’ll try to help further.
So when I ran it and asked to print in the locations you mentioned –
It printed something like the following-
loop starts
loop starts
loop starts
loop start ……
14
28
142 …….
So according to that you never actually enter your “if” statement. But count increments still so your print statements either can’t be in the right place or $count is being added too elsewhere in your script. I guess you could be also printing something other than $count, conceivably.
Also FYI perl can accept evalues as numbers, so you don’t necessarily need the fancy regular expression.
Also also FYI a handier way to deal with this file more like NCBI’s output would be @array = split /\s+/, $filecount; your evalue would then be $array[2], I think from your regex.