reconhub / learn

RECON learn: a free, open platform for training material on epidemics analysis
https://reconlearn.org
Other
35 stars 30 forks source link

practical-TB #69

Closed juanvesga closed 5 years ago

juanvesga commented 5 years ago

Added practical TB, just to see how it looks and if all links are correct

juanvesga commented 5 years ago

Hi Zhian, many thanks for the comments. And great to to know about tidy verse styler, I did not know there was such a thing. I think you are right about the style, and I would very much appreciate your help with this, also the solutions file sounds like a great idea, I left the chunks of answers commented out , hoping that students might find the answers when they go to the source code, to point them there after the practical. But a solutions format sounds better. Overall, in response :

BW,

Juan

On 14 Jun 2019, at 10:17, Zhian N. Kamvar notifications@github.com<mailto:notifications@github.com> wrote:

@zkamvar requested changes on this pull request.

Hi @juanvesgahttps://github.com/juanvesga. This looks good to me. I had a couple of questions regarding if you want help adding the ability to make a "solutions" version of this document. The only other things that I would suggest is to make sure that the R style is consistent (I use the tidyverse style guide: https://style.tidyverse.org/). For example this line is exhibits good stylehttps://github.com/reconhub/learn/pull/69/files#diff-e1d4c7ccce131fb785bdd8015a4aaa20R177, but this line has issues with spacinghttps://github.com/reconhub/learn/pull/69/files#diff-e1d4c7ccce131fb785bdd8015a4aaa20R199. I am more than happy to help out with this aspect. Just let me know.


In content/post/practical-tb.Rmdhttps://github.com/reconhub/learn/pull/69#discussion_r293721949:

+Tuberculosis is an infectious disease caused by Mycobacterium tuberculosis. Pulmonary tuberculosis (PTB) is the most prevalent manifestation of the disease and also the form more likely to be infectious. TB is transmitted from person to person via micro droplets sprayed by an infectious individual when they cough or sneeze. Studies of household contacts and phylogenetic analysis have estimated the transmission potential of the average infectious TB case to be between 4 and 18 secondary cases per year (1). + +An important feature in the timeline of TB infection is the latent period. The vast majority of newly infected individuals progress into a latent stage where M. tuberculosis remains dormant in a non-replicative stage, and as such, non-infectious. Breaking out from the latent stage into active pulmonary disease is a process mediated by several risk factors, and one that in most cases never realizes. At the population level it is accepted as a broad estimation that 10% of latent infections will break into active disease during a life-span (2). On the other hand, we also know that ~10% of new TB transmission events will fast-track into active TB disease (3). Active TB cases, as we discussed above, are symptomatic and infectious. Intermediate stages of subclinical active TB are currently recognized, but for simplicity we will accept here that symptomatic disease equals infectiousness. + +The average duration of the infectious period is ~3 years. Cohort studies have established that after this period roughly 50% of active TB cases die from the disease, while the other 50% recover spontaneously (4). TB does not confer complete immunity after recovery, however partial immunity has been observed in previously infected and might protect from reinfection (HR ~0.5) (5). Finally, individuals who had recovered from active TB are not only susceptible for re-infection, but they can relapse into active disease, usually at a yearly rate of around 0.5% (6). + + +1) Following the statement above, can you complete the table of parameters? Draw a flow chart if necessary. +(Note: All parameters with prefix T. are in a scale of time (years). Use this parameters to calculate the missing rates as necessary). + + +First, let's load some libraries we need. +```{r echo=TRUE} +#Load packages +library(deSolve) +## Warning: package 'deSolve' was built under R version 3.4.4

Can you remove this comment? It will only confuse readers.


In content/post/practical-tb.Rmdhttps://github.com/reconhub/learn/pull/69#discussion_r293722983:

+

  • wrap-up

  • dx <- c(dU, dL, dI, dR, dIncidence, dIrecent , dIremote)
  • list(dx)
  • }
  • ) +} +```
  • +3) Looking at the code above, can you write down (on paper) the differential equations for this model?

  • +```{r include=FALSE}

Would you like me to include a parameter for showing/hiding chunks? For example, this has already been done here: https://github.com/reconhub/learn/blob/e39d940055f8ad6bce0f29c58d6c6f67738348ce/content/post/practical-real-time-response-2.Rmd#L11-L20


In content/post/practical-tb.Rmdhttps://github.com/reconhub/learn/pull/69#discussion_r293723932:

+ + +``` + + +We have produced and incidence trajectory for a system that seems to be in endemic equilibrium. What does this mean? + + +4) Can you take a moment and try to explain in a few words what it means for an epidemic to achieve an endemic equilibrium? + + +5) Making use of concepts from your previous lectures, can you think of a simple mathematical expression for the endemic equilibrium in terms of the basic reproduction number ($R_0$) ? + +<!-- --- --> + +

Similar to my previous comment, would you like help formatting this so that a "solutions" document can be generated? Example here:

https://github.com/reconhub/learn/blob/e39d940055f8ad6bce0f29c58d6c6f67738348ce/content/post/practical-real-time-response-2.Rmd#L166-L172

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/reconhub/learn/pull/69?email_source=notifications&email_token=AD7RQFG7GGSVWXOTCTXXR7TP2NOZHA5CNFSM4HX3CJHKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB3RXWNA#pullrequestreview-249789236, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AD7RQFFSGRKFLHQHKDI7UM3P2NOZHANCNFSM4HX3CJHA.

zkamvar commented 5 years ago

I'll go ahead and make some changes on your branch and then merge when you are okay with it.

juanvesga commented 5 years ago

Sounds fantastic, many thanks

On 14 Jun 2019, at 11:15, Zhian N. Kamvar notifications@github.com<mailto:notifications@github.com> wrote:

I'll go ahead and make some changes on your branch and then merge when you are okay with it.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/reconhub/learn/pull/69?email_source=notifications&email_token=AD7RQFF33S2JW4ETK5Z64MLP2NVTBA5CNFSM4HX3CJHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXWL4TI#issuecomment-502054477, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AD7RQFH37CJ4WVYVOWQFAEDP2NVTBANCNFSM4HX3CJHA.

zkamvar commented 5 years ago

Looks good! I wasn't able to get the automated solution rendering working (because it relies on a global variable called "params", but you define a different variable in the practical and R gets confused, so I added a workaround).

juanvesga commented 5 years ago

Hi Zhian, thanks so much. It looks great.!

On 14 Jun 2019, at 14:06, Zhian N. Kamvar notifications@github.com<mailto:notifications@github.com> wrote:

Merged #69https://github.com/reconhub/learn/pull/69 into master.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/reconhub/learn/pull/69?email_source=notifications&email_token=AD7RQFGALTNQKDBF6OIEQ2LP2OJVTA5CNFSM4HX3CJHKYY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOR7OOCJQ#event-2413617446, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AD7RQFFNZVTW7ONWMBQSWYLP2OJVTANCNFSM4HX3CJHA.