Lab6 - Jupyter Notebook

pdf

School

University of Notre Dame *

*We aren’t endorsed by this school

Course

1 - 6

Subject

Biology

Date

Feb 20, 2024

Type

pdf

Pages

10

Uploaded by ElderFalconPerson1054

Report
2021-10-28, 7 : 52 PM Lab6 - Jupyter Notebook Page 1 of 10 https://biojupyterhub.utm.utoronto.ca/user/bravogr1/notebooks/BIO152_Lab6/Lab6.ipynb Lab 6 Activity B: Testing the Antimicrobial Properties of Spices (16 Marks) Your assignment must be completed individually . While you may discuss the assignment with the other students in your lab and consult other resources, be careful not to plagiarize - your answers MUST be in your own words. In past years your lab was completed with your group members. While you may discuss the assignment with the other students in your lab and consult the lab notes, be careful not to plagiarize - your answers MUST be in your own words. Normally you would analyze the data from your entire practical section. This year, the data for your analysis are provided in the Lab 6 folder. This time they are plain text files called garlicTreatmentData.txt . If you are curious what is in each folder feel free to open them in JupyterHub. When you are done the assignment you can download your notebook as a PDF for submission on the BIO152 Quercus course page. Experimental Question: Does garlic a ff ect bacterial growth? Question 1: What is the independent variable? (1 mark) The independent variable is the garlic concentration. Question 2: What is the dependent variable? (1 mark) The dependent variable is the quantity of bacteria growth. Question 3: Formal Hypothesis Statement: (1 mark)
2021-10-28, 7 : 52 PM Lab6 - Jupyter Notebook Page 2 of 10 https://biojupyterhub.utm.utoronto.ca/user/bravogr1/notebooks/BIO152_Lab6/Lab6.ipynb The garlic concentration will a ff ect the quantity of bacteria growth. Question 4: What do you think should happen to bacterial growth in the garlic treatments? Why? (1 mark) I think there will be less bacterial development in the garlic treatements and the higher the concentration of garlic is, the less bacteria will develop becausse garlic is said to be an antimicrobial agent. Question 5: Do you expect to see bacterial growth around the negative control disc when you examine your plates? Why/why not? (1 mark) Yes, I do expect to see bacterial growth around the negative control disc when you examine your plates because for example there was no justification for the ecoli to not devlop due to the reason that there was no antimicrobial agent added to the negative control. Question 6: What would a ZOI around the control disc tell you about the validity of your experimental results? Explain. (2 marks) Having a ZOI around the control disc that explains the validity of the experimental results says that the experiment and the results seemed to be fixed. This is because there was no antimicrobial agent added. Question 7: Do you expect to see bacterial growth around the positive control disk (streptomycin) when you examine your plates? Why or Why not? (1 mark) No, I do not expect to see bacterial growth around the positive control disk (streptomycin) when I examine the plates because I expect it to have a ZOI. Streptomycin is ought to repress the bacterial development around the plate.
2021-10-28, 7 : 52 PM Lab6 - Jupyter Notebook Page 3 of 10 https://biojupyterhub.utm.utoronto.ca/user/bravogr1/notebooks/BIO152_Lab6/Lab6.ipynb Results R Exercise: Read in data (1 Mark) In the Lab 6 folder there is a data file called garlicTreatmentData.txt Read the file into a data frame and assign the data frame to an object called garlic_df This table includes two columns: 1. ZOI : The diameter (in mm) of the Zone of Inhibition measured 2. Treatment : The treatment for each ZOI measurement. Treatment can take four values: NegControl: Negative Control, Water PosControl: Positive Control, Streptomycin Garlic1: Garlic suspension @ 1X concentration Garlic2: Garlic suspension @ 0.5X concentration In [3]: ZOI Treatment 1 0 NegControl 2 0 NegControl 3 0 NegControl 4 3 NegControl 5 0 NegControl 6 0 NegControl 7 0 NegControl 8 0 NegControl 9 5 NegControl 10 0 NegControl 11 0 NegControl 12 0 NegControl 13 0 NegControl 14 0 NegControl 15 0 NegControl 16 0 NegControl 17 1 NegControl garlic_df <- read.table( "garlicTreatmentData.txt" , header = TRUE ) print ( garlic_df )
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
2021-10-28, 7 : 52 PM Lab6 - Jupyter Notebook Page 4 of 10 https://biojupyterhub.utm.utoronto.ca/user/bravogr1/notebooks/BIO152_Lab6/Lab6.ipynb 18 0 NegControl 19 0 NegControl 20 0 NegControl 21 0 NegControl 22 0 NegControl 23 0 NegControl 24 0 NegControl 25 25 PosControl 26 20 PosControl 27 22 PosControl 28 24 PosControl 29 26 PosControl 30 15 PosControl 31 19 PosControl 32 25 PosControl 33 30 PosControl 34 20 PosControl 35 22 PosControl 36 25 PosControl 37 24 PosControl 38 22 PosControl 39 23 PosControl 40 28 PosControl 41 25 PosControl 42 23 PosControl 43 22 PosControl 44 19 PosControl 45 25 PosControl 46 23 PosControl 47 18 PosControl 48 24 PosControl 49 20 Garlic1 50 22 Garlic1 51 18 Garlic1 52 28 Garlic1 53 24 Garlic1 54 22 Garlic1 55 20 Garlic1 56 30 Garlic1 57 22 Garlic1 58 24 Garlic1 59 20 Garlic1 60 16 Garlic1 61 12 Garlic1 62 20 Garlic1 63 28 Garlic1 64 6 Garlic1 65 14 Garlic1 66 24 Garlic1 67 24 Garlic1
2021-10-28, 7 : 52 PM Lab6 - Jupyter Notebook Page 5 of 10 https://biojupyterhub.utm.utoronto.ca/user/bravogr1/notebooks/BIO152_Lab6/Lab6.ipynb 68 28 Garlic1 69 20 Garlic1 70 26 Garlic1 71 24 Garlic1 72 22 Garlic1 73 10 Garlic2 74 11 Garlic2 75 9 Garlic2 76 14 Garlic2 77 12 Garlic2 78 11 Garlic2 79 10 Garlic2 80 15 Garlic2 81 11 Garlic2 82 12 Garlic2 83 10 Garlic2 84 8 Garlic2 85 6 Garlic2 86 10 Garlic2 87 14 Garlic2 88 3 Garlic2 89 7 Garlic2 90 12 Garlic2 91 12 Garlic2 92 14 Garlic2 93 10 Garlic2 94 13 Garlic2 95 12 Garlic2 96 11 Garlic2
2021-10-28, 7 : 52 PM Lab6 - Jupyter Notebook Page 6 of 10 https://biojupyterhub.utm.utoronto.ca/user/bravogr1/notebooks/BIO152_Lab6/Lab6.ipynb Standard deviation Most commonly we use averages to summarize properties of a group. However, while the mean is useful it is also important to know how variable a group is; are all the samples very similar (close to the mean) or are the samples highly variable (far from the mean)? The Standard deviation is the average di ff erence of samples from the group mean. For example, imagine an exam, where the average is 70%. If everyone has a grade between 65%-75% then the standard deviation is small, on the otherhand if a few unfortunate people got 10% and some others got 99% then the standard deviation may be large. In R we can calculate the standard deviation using the function sd() . It works very similarly to the mean() function. Simply provide the vector (or data frame column) you want to analyze as an argument and sd() does the rest. R exercise: Calculate and print the mean and standard deviation ZOI of each treatment (2 marks) Use mean() and sd() to calculate and print the mean and standard deviation of each of the four treatments in the corresponding cells below. Hints: You can use the same data frame filtering method you employed in Lab 3 to calculate the mean of the data after you isolate only the rows that match each treatment. The code for the mean and sd will be very similar, only di ff ering in whether you use the mean() or sd() function. Make sure your TA can see the values you have calculated! Mean and SD of Negative Control
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
2021-10-28, 7 : 52 PM Lab6 - Jupyter Notebook Page 7 of 10 https://biojupyterhub.utm.utoronto.ca/user/bravogr1/notebooks/BIO152_Lab6/Lab6.ipynb In [6]: Mean and SD of Positive Control In [5]: Mean and SD of Garlic1 In [15]: [1] "Mean ZOI for Negative Control Treatments" [1] 0.375 [1] "Standard Deviation ZOI for Negative Control Treatments" [1] 1.172604 [1] "Mean ZOI for Positive Control Treatments" [1] 22.875 [1] "Standard Deviation ZOI for Positive Control Treatments" [1] 3.287823 Error in parse(text = x, srcfile = src): <text>:4:20: unexpected symb ol 3: print("Mean ZOI for Garlic1 Treatments") 4: print(garlic1_mean)garlic1_sd ^ Traceback: NegControl_df <- garlic_df $ ZOI[garlic_df $ Treatment == "NegControl" ] NegControl_mean <- mean(NegControl_df) print( "Mean ZOI for Negative Control Treatments" ) print(NegControl_mean) NegControl_sd <- sd(NegControl_df) print( "Standard Deviation ZOI for Negative Control Treatments" ) print ( NegControl_sd ) PosControl_df <- garlic_df $ ZOI[garlic_df $ Treatment == "PosControl" ] PosControl_mean <- mean(PosControl_df) print( "Mean ZOI for Positive Control Treatments" ) print(PosControl_mean) PosControl_sd <- sd(PosControl_df) print( "Standard Deviation ZOI for Positive Control Treatments" ) print ( PosControl_sd ) Garlic1_df <- garlic_df $ ZOI[garlic_df $ Treatment == "Garlic1" ] Garlic1_mean <- mean(garlic1_df) print( "Mean ZOI for Garlic1 Treatments" ) print(garlic1_mean)garlic1_sd <- sd(garlic1_df) print( "Standard Deviation ZOI for Garlic1 Treatments" ) print(Garlic1_sd)
2021-10-28, 7 : 52 PM Lab6 - Jupyter Notebook Page 8 of 10 https://biojupyterhub.utm.utoronto.ca/user/bravogr1/notebooks/BIO152_Lab6/Lab6.ipynb Mean and SD of Garlic2 In [9]: Box plots One of the most common ways to visualize di ff erences between groups is using a box plot. A box plot shows each group as a box, where the height of the box and the whiskers around it are in proportion to how variable the samples from each group are. Lets take a simple case. In the following example we have measured the cell length of five Escherichia coli bacteria and five Pseudomonas aeruginosa bacteria. The measuresments have been recorded in two vectors: 1. cell_lengths - which is the length of each measurement in μm 2. genus - which is the genus that each measurement was made in We can make a box plot that will show compare the size of each species, and show the variation within each group using the boxplot() In [ ]: Error in parse(text = x, srcfile = src): <text>:4:20: unexpected symb ol 3: print("Mean ZOI for Garlic2 Treatments") 4: print(Garlic2_mean)Garlic2_sd ^ Traceback: Garlic2_df <- garlic_df $ ZOI[garlic_df $ Treatment == "Garlic2" ] Garlic2_mean <- mean(Garlic2_df) print( "Mean ZOI for Garlic2 Treatments" ) print(Garlic2_mean)Garlic2_sd <- sd(Garlic2_df) print( "Standard Deviation ZOI for Garlic2 Treatments" ) print ( Garlic2_sd ) .6 , 3.0 , 1.7 , 1.8 , 2.1 , 2.3 , 3.2 , 4.1 , 1.9 , 4.5 ) onas' , 'Pseudomonas' , 'Escherichia' , 'Escherichia' , 'Escherichia' , 'Esc plot gths ~ genus)
2021-10-28, 7 : 52 PM Lab6 - Jupyter Notebook Page 9 of 10 https://biojupyterhub.utm.utoronto.ca/user/bravogr1/notebooks/BIO152_Lab6/Lab6.ipynb Lets breakdown this statement: boxplot(cell_lengths~genus) First we call the function boxplot including the brackets ( ) , in which we will type the data needed to make the boxplot. Next we provide the name of a vector that contains the measurements we want to plot - in this case the lengths of each bacteria we measured, cell_lengths . We then add a ~ sign which tells boxplot that you are going to separate your measurements into groups. The last vector genus comes after the ~ and gives boxplot the group that each measurement came from. In this case it allows boxplot to know what measure came from Escherichia or Pseudomonas. The box plot displays a few things: The box height represents the central 50% of the data (1st quartile to 3rd quartile). The line in the box represents the median , which is the point where half of the data are above and half are below (note this is not the same as the mean!). The ' whiskers ' extend above and below the box by 1.5X the box height /or/ to the edge of the data if all the points are within this range. Data points shown outside the whiskers are referred to as 'outliers' because they are so far from the central part of the data. R Exercise: Make a box plot to compare experimental treatments (2 marks) Use the boxplot() function and your garlic_df to make a box plot that compares the size of the Zone of Inhibition (ZOI) for the two garlic treatments as well as the positive and negative controls. Hints : Remember you can treat columns in a data frame as vectors using the $ notation If you like you can add xlab and ylab to your boxplot command to give better x- and y- axis labels For example: boxplot(df$my_data ~ df$my_treatments, xlab="My X- axis", ylab="My Y-axis")
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
2021-10-28, 7 : 52 PM Lab6 - Jupyter Notebook Page 10 of 10 https://biojupyterhub.utm.utoronto.ca/user/bravogr1/notebooks/BIO152_Lab6/Lab6.ipynb In [8]: Question 10: Provide a summary of the results in 2-3 sentences. (3 marks) ZOI <- garlic_df $ ZOI Treatment <- garlic_df $ Treatment boxplot(ZOI ~ Treatment, xlab = "Treatment" , ylab = "Zone of Inhibition Diam The outcomes show that the convergence of garlic affected bacterial development. The ZOI was bigger on Garlic1, where there was twofold the convergence of garlic as Garlic2. This showsthat the garlic was an antimicrobial specialist and the higher the focus, the less bacterial growth