Skip to content

Commit

Permalink
flu: check in data from current season (#239)
Browse files Browse the repository at this point in the history
Check in influenza data from current season

Also ran new version of black
  • Loading branch information
jeffkaufman authored Mar 18, 2024
1 parent ef39e12 commit d7cb2ae
Show file tree
Hide file tree
Showing 10 changed files with 2,495 additions and 64 deletions.
6 changes: 3 additions & 3 deletions figures/counts-by-pathogen-and-study.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ def start():
matching_reads = mgs_data.viral_reads(bioproject, taxids)
viral_samples = mgs_data.sample_attributes(
bioproject,
enrichment=None
if study == "brinch"
else mgs.Enrichment.VIRAL,
enrichment=(
None if study == "brinch" else mgs.Enrichment.VIRAL
),
)
n_samples += len(viral_samples)
counts = [
Expand Down
8 changes: 5 additions & 3 deletions mgs.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,11 @@ def make_count_tree(
taxtree: Tree[TaxID], sample_counts: SampleCounts
) -> Tree[tuple[TaxID, Counter[Sample]]]:
return taxtree.map(
lambda taxid: (taxid, Counter(sample_counts[taxid]))
if taxid in sample_counts
else (taxid, Counter()),
lambda taxid: (
(taxid, Counter(sample_counts[taxid]))
if taxid in sample_counts
else (taxid, Counter())
),
)


Expand Down
3 changes: 1 addition & 2 deletions pathogen_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,7 @@ def average(in1: "Scalar", in2: "Scalar"):

class Predictor(abc.ABC, Variable):
@abc.abstractmethod
def get_data(self) -> float:
...
def get_data(self) -> float: ...


@dataclass(kw_only=True, eq=True, frozen=True)
Expand Down
2 changes: 1 addition & 1 deletion pathogens/aav2.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# (93K%2C%20docx)-,Supplemental%20data%3A,-Click%20here%20to
date="2022",
active=Active.LATENT,
source="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9063149/#:~:text=Seropositivity%20for%20(A)%20the%20global%20population"
source="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9063149/#:~:text=Seropositivity%20for%20(A)%20the%20global%20population",
# This number matches AAV-2 seroprevalence in a study of 101 males with
# Duchenne Muscular Dystrophy, showing a seroprevalence of 56%:
# "https://pubmed.ncbi.nlm.nih.gov/36324212/#:~:text=We%20prospectively%20enrolled,and%20AAV8%20(47%25)."
Expand Down
2 changes: 1 addition & 1 deletion pathogens/bkv.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
date="2007",
# Study is from 2009, sera are from 2007
active=Active.LATENT,
source="https://journals.plos.org/plospathogens/article?id=10.1371/journal.ppat.1000363#:~:text=We%20found%20the%20seroprevalence%20(%2B/%E2%88%92%201%25)%20in%20healthy%20adult%20blood%20donors%20(1501)%20was%20SV40%20(9%25)%2C%20BKV%20(82%25)%2C%20JCV%20(39%25)%2C%20LPV"
source="https://journals.plos.org/plospathogens/article?id=10.1371/journal.ppat.1000363#:~:text=We%20found%20the%20seroprevalence%20(%2B/%E2%88%92%201%25)%20in%20healthy%20adult%20blood%20donors%20(1501)%20was%20SV40%20(9%25)%2C%20BKV%20(82%25)%2C%20JCV%20(39%25)%2C%20LPV",
# A tabular breakdown can be found here: "https://journals.plos.org/plospathogens/article?id=10.1371/journal.ppat.1000363#:~:text=original%20image-,Table%201.,-Seroprevalence%20of%20polyomaviruses"
)

Expand Down
2 changes: 1 addition & 1 deletion pathogens/hcv.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
date="2020",
country="United States",
state="Ohio",
source="https://odh.ohio.gov/wps/wcm/connect/gov/ec0dec22-1eea-4d17-a86a-ac4bc35be4d3/HCV+5+Year+Report+2021.pdf?MOD=AJPERES&CONVERT_TO=url&CACHEID=ROOTWORKSPACE.Z18_M1HGGIK0N0JO00QO9DDDDM3000-ec0dec22-1eea-4d17-a86a-ac4bc35be4d3-oqU9kQ8"
source="https://odh.ohio.gov/wps/wcm/connect/gov/ec0dec22-1eea-4d17-a86a-ac4bc35be4d3/HCV+5+Year+Report+2021.pdf?MOD=AJPERES&CONVERT_TO=url&CACHEID=ROOTWORKSPACE.Z18_M1HGGIK0N0JO00QO9DDDDM3000-ec0dec22-1eea-4d17-a86a-ac4bc35be4d3-oqU9kQ8",
# Page 1 of 8
)

Expand Down
2 changes: 1 addition & 1 deletion pathogens/hiv.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
people=652_221,
country="Denmark",
date="2022",
source="https://kk.statistikbank.dk/statbank5a/SelectVarVal/Define.asp?MainTable=KKBEF1"
source="https://kk.statistikbank.dk/statbank5a/SelectVarVal/Define.asp?MainTable=KKBEF1",
# Search variables: Copenhagen in total, Gender in general, Age in total,
# 2022 Q4
)
Expand Down
2 changes: 1 addition & 1 deletion pathogens/jcv.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
date="2007",
# Study is from 2009, sera are from 2007
active=Active.LATENT,
source="https://journals.plos.org/plospathogens/article?id=10.1371/journal.ppat.1000363#:~:text=We%20found%20the%20seroprevalence%20(%2B/%E2%88%92%201%25)%20in%20healthy%20adult%20blood%20donors%20(1501)%20was%20SV40%20(9%25)%2C%20BKV%20(82%25)%2C%20JCV%20(39%25)%2C%20LPV"
source="https://journals.plos.org/plospathogens/article?id=10.1371/journal.ppat.1000363#:~:text=We%20found%20the%20seroprevalence%20(%2B/%E2%88%92%201%25)%20in%20healthy%20adult%20blood%20donors%20(1501)%20was%20SV40%20(9%25)%2C%20BKV%20(82%25)%2C%20JCV%20(39%25)%2C%20LPV",
# A tabular breakdown can be found here: "https://journals.plos.org/plospathogens/article?id=10.1371/journal.ppat.1000363#:~:text=original%20image-,Table%201.,-Seroprevalence%20of%20polyomaviruses"
)

Expand Down
2 changes: 1 addition & 1 deletion pathogens/mcv.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
country="United States",
date="2009",
active=Active.LATENT,
source="https://academic.oup.com/jnci/article/101/21/1510/963538#:~:text=A%20cut%20point%20of%2015%E2%80%89000%20median%20fluorescent%20intensity%20units%20was%20chosen%20as%20described%20above%20and%20used%20to%20identify%20268%20(59.4%25)%20of%20the%20451%20control%20subjects%20as%20seropositive%20for%20MCPyV%20VP1%3B%20this%20percentage%20was%20similar%20to%20that%20among%20women%20in%20control%20group%201%20(ie%2C%2053%25)."
source="https://academic.oup.com/jnci/article/101/21/1510/963538#:~:text=A%20cut%20point%20of%2015%E2%80%89000%20median%20fluorescent%20intensity%20units%20was%20chosen%20as%20described%20above%20and%20used%20to%20identify%20268%20(59.4%25)%20of%20the%20451%20control%20subjects%20as%20seropositive%20for%20MCPyV%20VP1%3B%20this%20percentage%20was%20similar%20to%20that%20among%20women%20in%20control%20group%201%20(ie%2C%2053%25).",
# Other studies give numbers that are up to 20 percentage points smaller
# or larger:
# "In an early study from the United States (US), MCPyV seroprevalence in
Expand Down
Loading

0 comments on commit d7cb2ae

Please sign in to comment.