Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • mdm-lab/wiki
  • hvaysset/wiki
  • jsousa/wiki
  • tclabby/wiki
4 results
Show changes
Showing
with 507 additions and 164 deletions
import Papa from 'papaparse';
// import { saveAs } from "file-saver";
import { useDownloadBlob } from './useDownloadBlob';
const { download } = useDownloadBlob()
export function useCsvDownload(
rawData: MaybeRef<Record<string, any>>,
columns: MaybeRef<string[] | undefined> = undefined,
baseName: MaybeRef<string> = 'data'
) {
const filename = ref(`df-${toValue(baseName)}.csv`)
const data = ref()
const blob = ref()
if (toValue(rawData)?.hits?.length > 0) {
data.value = toValue(rawData).hits.map(row => {
let sanitizedRow = { ...row }
if (sanitizedRow?.PFAM?.length > 0) {
sanitizedRow = {
...sanitizedRow,
PFAM: sanitizedRow.PFAM.map(({ AC }) => AC).join(", ")
}
}
if (sanitizedRow?.contributors?.length > 0) {
sanitizedRow = {
...sanitizedRow,
contributors: sanitizedRow.contributors.join(", ")
}
}
return sanitizedRow
})
const csvContent = Papa.unparse(toValue(data), { columns: toValue(columns) });
blob.value = new Blob([csvContent], { type: "text/csv" });
download(blob, filename)
}
return { data, filename }
}
export function useDownloadBlob() {
function download(blob: MaybeRef<Blob>, filename: MaybeRef<string>) {
const toValueBlob = toValue(blob)
const toValueFilename = toValue(filename)
var a = document.createElement("a");
a.href = URL.createObjectURL(toValueBlob);
a.download = toValueFilename;
a.click();
URL.revokeObjectURL(a.href);
}
return { download }
}
\ No newline at end of file
......@@ -2,17 +2,19 @@ import { useArticlesStore, type CslJson } from '../stores/articles'
import { ref, computed, watchEffect, toValue } from "vue"
// import { useFetch } from '#app';
// import { useFetch } from "nuxt"
import { useFetch } from '#imports'
import { type MaybeRef, useFetch } from '#imports'
import article from "@/public/articles.json"
export interface ArticleMessage {
export interface CrossrefArticle {
DOI: string;
issue: number;
title: string | string[];
type: string;
title: string[];
author: Array<{ family: string; given: string }>;
"container-title-short": string;
// "container-title-short": string;
"short-container-title": string;
"container-title": string;
abstract: string;
abstract?: string;
published: {
"date-parts": string[];
};
......@@ -23,7 +25,7 @@ export interface ArticleMessage {
export interface Article {
export interface WikiArticle {
DOI: string
title: string
subtitle: string
......@@ -36,115 +38,125 @@ export interface Article {
prependIcon: string
}
export interface RawArticle {
message: ArticleMessage
message: CrossrefArticle
}
type SrcArticle = ArticleMessage | CslJson
type SrcArticle = CrossrefArticle | CslJson
export function useFetchArticle(doi: string) {
export function useFetchArticle(doi: MaybeRef<string> = ref("")) {
// const article = ref<Article>()
// const rawArticle = ref<RawArticle>()
const srcArticle = ref<SrcArticle | null>(null)
const store = useArticlesStore()
const pending = ref(false)
const doiBaseUrl = ref(new URL("https://doi.org/"));
const url = ref(new URL(`/works/${doi}`, " https://api.crossref.org/").href);
const article = computed(() => {
if (srcArticle.value != undefined) {
const url = ref(new URL(`/works/${toValue(doi)}`, " https://api.crossref.org/").href);
const article = ref()
const zoteroArticles = ref()
function toAuthorsString(authors: Array<{ family: string; given: string }>) {
return authors
.map((curr) => {
return `${curr.family} ${curr.given}`;
})
.join(", ");
}
function getReferenceUrl(doi: string) {
return new URL(doi, doiBaseUrl.value).href;
}
function zoteroArticleToArticle(zoteroArticle: CslJson) {
if (zoteroArticle != undefined) {
const {
DOI,
title,
"container-title-short": cts,
"container-title": ct,
journalAbbreviation,
abstract,
published,
issued,
author,
...rest
} = srcArticle.value;
let sanitizedAbstract = abstract
if (sanitizedAbstract) {
sanitizedAbstract = /(?:\<jats\:p\>)?(.*)(?:\<\/jats\:p\>)?/.exec(sanitizedAbstract)?.[1] ?? ''
}
const sanitizedTitle = (Array.isArray(title)) ? title[0] : title
const sanitizedContainerTitle = (Array.isArray(ct)) ? cts?.length > 0 ? cts[0] : ct?.length > 0 ? ct[0] : "" : journalAbbreviation || ct
} = zoteroArticle;
return {
DOI,
title: sanitizedTitle,
title,
subtitle: toAuthorsString(author || []),
author,
containerTitle: sanitizedContainerTitle,
abstract: sanitizedAbstract,
year: published?.["date-parts"][0][0] ?? issued?.["date-parts"][0][0] ?? '',
containerTitle: ct,
abstract,
year: issued?.["date-parts"][0][0] ?? '',
href: getReferenceUrl(DOI),
target: "_blank",
prependIcon: "mdi-newspaper-variant-outline",
}
} else { return srcArticle.value }
})
const zoteroArticles = ref([])
// const config = useRuntimeConfig()
// console.log(config.value)
const fetchLocalArticles = () => {
useFetch<RawArticle[]>(
"/articles.json",
{ lazy: true, server: false }
).then(({ data }) => {
zoteroArticles.value = data.value
}) // localPending.value = articlesPending.value
if (zoteroArticles.value?.length > 0) {
for (const article of zoteroArticles.value) {
// console.log("article files : ", article.DOI)
store.add(article)
}
}
}
const fetchCrossRef = () => {
useFetch<RawArticle>(toValue(url), {
lazy: true, server: false,
}).then(({ data, pending: pendingUseFetch }) => {
if (data.value?.message) {
srcArticle.value = data.value.message
}
pending.value = pendingUseFetch.value
})
}
watchEffect(() => {
// no article in the store
if (store.articles.size === 0) {
fetchLocalArticles()
function crossrefToArticle(article: CrossrefArticle): WikiArticle {
const { title, DOI, type, "container-title": ct, "short-container-title": sct, abstract, author, issued } = article
// let sanitizedAbstract = abstract
const sanitizedAbstract = abstract ? /(?:\<jats\:p\>)?(.*)(?:\<\/jats\:p\>)?/.exec(abstract)?.[1] ?? '' : ''
const sanitizedContainerTitle = sct?.length > 0 ? sct[0] : ct?.length > 0 ? ct[0] : ""
return {
title: title?.length > 0 ? title[0] : "",
DOI,
abstract: sanitizedAbstract,
containerTitle: sanitizedContainerTitle,
subtitle: toAuthorsString(author || []),
author,
year: issued?.["date-parts"][0][0] ?? '',
href: getReferenceUrl(DOI),
target: "_blank",
prependIcon: "mdi-newspaper-variant-outline"
}
}
if (store.articles.has(doi)) {
srcArticle.value = store.articles.get(doi)
return
} else {
fetchCrossRef()
}
function crossrefToCsl(article: CrossrefArticle): CslJson {
const { title, DOI, type, "container-title": ct, "short-container-title": sct, abstract, author, issued } = article
// let sanitizedAbstract = abstract
const sanitizedAbstract = abstract ? /(?:\<jats\:p\>)?(.*)(?:\<\/jats\:p\>)?/.exec(abstract)?.[1] ?? '' : ''
const sanitizedContainerTitle = sct?.length > 0 ? sct[0] : ct?.length > 0 ? ct[0] : ""
return {
title: title?.length > 0 ? title[0] : "",
type,
DOI,
abstract: sanitizedAbstract,
author,
"container-title": sanitizedContainerTitle,
issued
})
function toAuthorsString(authors: Array<{ family: string; given: string }>) {
return authors
.map((curr) => {
return `${curr.family} ${curr.given}`;
})
.join(", ");
}
}
function getReferenceUrl(doi: string) {
return new URL(doi, doiBaseUrl.value).href;
if (store.articles.has(toValue(doi))) {
const cslArticle = store.articles.get(toValue(doi))
article.value = cslArticle ? zoteroArticleToArticle(cslArticle) : undefined
}
else {
useFetch<RawArticle>(toValue(url), {
lazy: true, server: false,
}).then(({ data, pending: pendingUseFetch }) => {
if (data.value?.message) {
article.value = crossrefToArticle(data.value.message)
store.add(crossrefToCsl(data.value.message))
}
pending.value = pendingUseFetch.value
})
}
// const fetchCrossRef = () => {
// useFetch<RawArticle>(toValue(url), {
// lazy: true, server: false,
// }).then(({ data, pending: pendingUseFetch }) => {
// if (data.value?.message) {
// srcArticle.value = data.value.message
// }
// pending.value = pendingUseFetch.value
// })
// }
return { article, pending }
}
......
import { MeiliSearch } from 'meilisearch'
import { useRuntimeConfig, watchEffect, type MaybeRef, ref, toValue } from '#imports'
import type { FacetDistribution, Hits } from 'meilisearch';
export function useFetchMsDocument(
import { useAsyncState } from '@vueuse/core'
import { errorMonitor } from 'events';
export async function useFetchMsDocument(
index: MaybeRef<string> = ref(""),
search: Ref<string> = ref(""),
filter: Ref<string> = ref(''),
......@@ -18,12 +21,11 @@ export function useFetchMsDocument(
apiKey: runtimeConfig.public.meiliApiKey
})
const pending = ref(false)
const filterError = ref(null)
const filterError: Ref<string | null> = ref(null)
const hits: Ref<Hits<Record<string, any>>> = ref([])
const totalHits = ref(0)
const totalPages = ref(0)
const facetDistribution: Ref<FacetDistribution | undefined> = ref({})
// reset page when filter and search change
watch(filter, () => {
page.value = 1
......@@ -32,34 +34,36 @@ export function useFetchMsDocument(
page.value = 1
})
watchEffect(async () => {
try {
pending.value = true
const res = await client
.index(toValue(index))
.search(toValue(search), {
limit: toValue(limit),
filter: toValue(filter),
hitsPerPage: toValue(hitsPerPage),
page: toValue(page),
facets: toValue(facets),
sort: toValue(sort),
})
filterError.value = null
const { hits: resHits, totalHits: resTotalHits, totalPages: resTotalPages, facetDistribution: facetD } = res
totalHits.value = resTotalHits
hits.value = resHits
totalPages.value = resTotalPages
facetDistribution.value = facetD
} catch ({ code, message }) {
if (code === 'invalid_search_filter') {
filterError.value = message
}
} finally {
pending.value = false
}
})
try {
pending.value = true
console.log(pending.value)
const res = await client
.index(toValue(index))
.search(toValue(search), {
limit: toValue(limit),
filter: toValue(filter),
hitsPerPage: toValue(hitsPerPage),
page: toValue(page),
facets: toValue(facets),
sort: toValue(sort),
})
filterError.value = null
const { hits: resHits, totalHits: resTotalHits, totalPages: resTotalPages, facetDistribution: facetD } = res
totalHits.value = resTotalHits
hits.value = resHits
totalPages.value = resTotalPages
facetDistribution.value = facetD
pending.value = false
} catch (e: any) {
filterError.value = e
}
finally {
pending.value = false
}
// })
// console.log(hits)
return { hits, totalHits, pending, filterError, totalPages, facetDistribution }
}
export function useNumericalFilter(
id: MaybeRef<string>,
min: MaybeRef<number>,
max: MaybeRef<number>,
) {
const range: Ref<[number, number]> = ref([toValue(min), toValue(max)])
const stringifyFilter: Ref<string | undefined> = ref(`${toValue(id)} ${toValue(min)} TO ${toValue(max)}`)
watchEffect(() => {
console.log("watch reange")
console.log(range.value)
if (range.value[0] === toValue(min) && range.value[1] === toValue(max)) {
stringifyFilter.value = undefined
} else {
stringifyFilter.value = `'${toValue(id)}' ${range.value[0]} TO ${range.value[1]}`
}
})
function reset() {
range.value = [toValue(min), toValue(max)]
}
// watch(() => range, () => {
// console.log("watch reange")
// console.log(range)
// if (range.value[0] === toValue(min) && range.value[1] === toValue(max)) {
// stringifyFilter.value = undefined
// } else {
// stringifyFilter.value = `${toValue(id)} ${toValue(min)} TO ${toValue(max)}`
// }
// }, { deep: true })
return { range, stringifyFilter, reset }
}
\ No newline at end of file
import { useDownloadBlob } from './useDownloadBlob';
import { useSerialize } from './useSerialize';
import { useSvgPlot } from './useSvgPlot';
const { serialize } = useSerialize()
export function useRasterize() {
function rasterize(component: MaybeRef<ComponentPublicInstance | null>, filename: MaybeRef<string>) {
const toValueCompo = toValue(component)
if (toValueCompo !== null) {
const { svg } = useSvgPlot(toValueCompo)
const toValueSvg = toValue(svg)
if (toValueSvg !== null) {
let resolve, reject;
const promise: Promise<Blob> = new Promise((y, n) => (resolve = y, reject = n));
const image = new Image;
image.onerror = reject;
console.log(toValueSvg)
image.onload = () => {
console.log("try to get boundingclientRect")
const rect = toValueSvg.getBoundingClientRect();
console.log(rect)
const canvas = document.createElement("canvas");
canvas.width = rect.width
canvas.height = rect.height
const ctx = canvas.getContext("2d")
if (ctx !== null) {
ctx.drawImage(image, 0, 0, rect.width, rect.height);
ctx.canvas.toBlob(resolve);
}
}
const blob = toValue(serialize(component))
if (blob !== undefined) {
image.src = URL.createObjectURL(blob);
}
return promise;
}
}
}
return { rasterize }
}
\ No newline at end of file
......@@ -10,7 +10,6 @@ export function useRefinedUrl(url: string | Ref<string>) {
const _base = withLeadingSlash(
withTrailingSlash(useRuntimeConfig().app.baseURL)
);
console.log(_base)
if (_base !== "/" && !sanitzedUrl.startsWith(_base)) {
return joinURL(_base, sanitzedUrl);
}
......
import { useSvgPlot } from './useSvgPlot';
export function useSerialize() {
const xmlns = ref("http://www.w3.org/2000/xmlns/");
const xlinkns = ref("http://www.w3.org/1999/xlink");
const svgns = ref("http://www.w3.org/2000/svg");
const blob = ref<Blob>()
function serialize(compo: MaybeRef<ComponentPublicInstance | null>) {
const toValueCompo = toValue(compo)
if (toValueCompo !== null) {
const { svg } = useSvgPlot(toValueCompo)
const toValueSvg = toValue(svg)
if (toValueSvg !== null) {
const clonedSvg = toValueSvg.cloneNode(true);
const fragment = window.location.href + "#";
const walker = document.createTreeWalker(toValueSvg, NodeFilter.SHOW_ELEMENT);
while (walker.nextNode()) {
for (const attr of walker.currentNode.attributes) {
if (attr.value.includes(fragment)) {
attr.value = attr.value.replace(fragment, "#");
}
}
}
clonedSvg.setAttributeNS(xmlns.value, "xmlns", svgns.value);
clonedSvg.setAttributeNS(xmlns.value, "xmlns:xlink", xlinkns.value);
const serializer = new window.XMLSerializer;
const string = serializer.serializeToString(clonedSvg);
blob.value = new Blob([string], { type: "image/svg+xml" });
return blob
}
else { return undefined }
}
}
return { serialize }
}
\ No newline at end of file
export function useSvgPlot(component: MaybeRef<ComponentPublicInstance>) {
const svg = ref<SVGElement | null>(null)
const toValueCompo = toValue(component)
const rootElem = toValueCompo.$el
svg.value = rootElem.querySelector("svg.plot")
return { svg }
}
\ No newline at end of file
......@@ -4,36 +4,37 @@ layout: article
navigation:
icon: 'md:home'
relevantAbstracts:
- doi: 10.1126/science.1138140
- doi: 10.1038/nmicrobiol.2017.92
- doi: 10.1128/jb.64.4.557-569.1952
- doi: 10.1128/jb.65.2.113-121.1953
- doi: 10.1128/JB.05535-11
- doi: 10.1126/science.aar4120
- doi: 10.1038/s41579-023-00934-x
- doi: 10.1126/science.1138140
- doi: 10.1126/science.aba0372
- doi: 10.1038/s41586-019-1894-8
- doi: 10.1128/jb.64.4.557-569.1952
- doi: 10.1128/JB.05535-11
- doi: 10.1016/j.cell.2021.12.029
- doi: 10.1038/nmicrobiol.2017.92
- doi: 10.1038/s41586-019-1894-8
---
## Introduction
Bacteriophages, or phages for short, are viruses that infect bacteria and hijack bacterial cellular machinery to reproduce themselves. Phages are extremely abundant entities, and could be responsible for up to 20-40% of bacterial mortality daily :ref{doi=10.1038/s41586-019-1894-8}. Therefore, phage infection constitutes a very strong evolutionary pressure for bacteria.
Bacteria and their phages have co-existed for billions of years. The pressure of phage infection is thought to be a major driver of bacterial evolution and has favored the development of a diversity of anti-phage weapons. These weapons, namely anti-phage defense systems can be defined as single genes or groups of genes that partially or fully inhibit phage infection. For reviews on anti-phage systems, see : :ref{doi=10.1038/s41586-019-1894-8,10.1146/annurev-micro-020722-013730,10.1016/j.mib.2005.06.006,10.1038/s41579-023-00934-x}.
In response to this evolutionary pressure, bacteria have developed an arsenal of anti-phage defense systems. The term "defense system" here designates either a single gene or a set of genes, which expression provides the bacteria with some level of resistance against phage infection.
## A brief history of anti-phage systems
## History
The first discovered anti-phage system, a Restriction-Modification (RM) system, was described in the early 1950s :ref{doi=10.1128/jb.64.4.557-569.1952,10.1128/jb.65.2.113-121.1953}. In the following decades, a handful of other systems were discovered :ref{doi=10.1016/j.mib.2005.06.006}. In 2007, CRISPR-Cas systems were discovered to be anti-phage systems :ref{doi=10.1126/science.1138140}. As CRISPR-Cas systems and RM systems are extremely prevalent in bacteria, it was thought for some years that the antiviral immune system of bacteria had been mostly elucidated.
The first anti-phage defense system was discovered in the early 1950s by two separate teams of researchers :ref{doi=10.1128/jb.64.4.557-569.1952}, :ref{doi=10.1128/jb.65.2.113-121.1953}. Luria and Human reported a mysterious phenomenon, where one phage was only capable of infecting a specific bacterial strain once. The progeny phages produced by this first round of infection had lost their ability to infect the same strain again, yet remained able to infect other bacterial strains. For them, this could only mean that "the genotype of the host in which a virus reproduces affects the phenotype of the new virus" :ref{doi=10.1128/jb.64.4.557-569.1952}. A similar phenomenon was shortly after described by Bertani and Wiegle.
Following these two major breakthroughs, knowledge of anti-phage systems remained scarce for some years. Yet, in 2011, it was revealed that anti-phage systems tend to colocalize on the bacterial genome in defense-islands :ref{doi=10.1128/JB.05535-11}. This led to a guilt-by-association hypothesis: if a gene or a set of genes is frequently found in bacterial genomes in close proximity to known defense systems, such as RM or CRISPR-Cas systems, then it might constitute a new defense system. This hypothesis was tested systematically in a landarmark study in 2018 :ref{doi=10.1126/science.aar4120} leading to the discovery of 10 novel anti-phage systems. This started the uncovering of an impressive diversity of defense systems in a very short amount of time :ref{doi=10.1038/s41579-023-00934-x}.
Their work was in fact the first report of what would later be named Restriction-Modification ([RM](/defense-systems/rm)) system, which is considered to be the first anti-phage defense system discovered.
To date over 150 types of defense systems have been described, unveiling an unsuspected diversity of molecular mechanisms. The antiviral immune systems of bacteria therefore appear much more complex than previously envisioned, and new discoveries do not seem to be slowing down.
The sighting of a second defense system occured more than 40 years later, in the late 1980s, when several teams around the world observed arrays containing short, palindromic DNA repeats clustered together on the bacterial genome :ref{doi=10.1038/nmicrobiol.2017.92}. Yet, the biological function of these repeats was only elucidated in 2007, when a team of researchers demonstrated that these repeats were part of a new anti-phage defense systems :ref{doi=10.1126/science.1138140}, known as [CRISPR-Cas system](https://en.wikipedia.org/wiki/CRISPR).
## Introducing the defense finder wiki
Following these two major breakthroughs, knowledge of anti-phage systems remained scarce for some years. Yet, in 2011, Makarova and colleagues revealed that anti-phage systems tend to colocalize on the bacterial genome in defense-islands :ref{doi=10.1128/JB.05535-11}. This led to a guilt-by-association hypothesis : if a gene or a set of genes is frequently found in bacterial genomes in close proximity to known defense systems, such as RM or CRISPR-Cas systems, then it might constitute a new defense system. This concept had a large role in the discovery of an impressive diversity of defense systems in a very short amount of time.
The fast pace of discoveries in the field can be intimidating to newcomers and can make it difficult for all to keep track of new discoveries. For this reason, we decided to implement a collaborative knowledge base for the community. This wiki is divided in two sections:
1. A “general concepts” section, introducing key notions and ideas to understand anti-phage defense
2. A section introducing succinctly each of the defense systems currently known.
## List of known defense systems
This wiki is only a first version, and is intended to evolve based on the ideas and needs of the people using it. Whether it is to suggest new pages or to edit existing ones, all contributions are more than welcomed: please do not hesitate to contact us to participate!
To date, more than 150 anti-phage defense systems have been described. An exhaustive list of the systems with experimentally validated anti-phage activity can be found [here](/defense-systems).
---
title: DefenseFinder Webservice
layout: article
---
# Documentation
## DefenseFinder
[DefenseFinder](https://github.com/mdmparis/defense-finder) is a software to detect defense systems in bacterial genomes.
It takes as input a fasta file, be it nucleic or protein (it will guess which).
On the web service page, users can upload (1) their fasta file(s). One can upload multiple fasta files at once, as many jobs will run.
Job are automatically launched once the upload is done. Jobs can be found in the analysis panel (2), and are named with the name of the input file. The job name can be changed.
Analyses are kept for 6 months, or with a maximum of 10 jobs.
![webservice_interface](/help/webservice_interface.jpg){max-width=750px}
In the Analyses panel, each past job is kept for 6 months. Next to the name of the input file (1) there is a rolling circle until the job finishes to run, which become a number. One can edit the job name (by default it's the file's name) by clicking on the small pen (2), or can delete a job (3). To visualize the results, one can click on Results (4) or on the job's name.
![analyses_interface](/help/analyses_interface.jpg){max-width=750px}
The result consists in 3 tables :
- Systems table : Shown by default. One system per line. On the column type, there is the name of the system, and one can click on it to be redirected to the corresponding wiki page (1).
- Genes table (2): One gene per line. Those are genes from the aforementioned system, with some addition information on the quality of the hit. The key between both table is `sys_id`
- HMMER table (3): One gene per line. Here it's all the genes hit by a hmm profile, even when the gene is not part of a defense system.
![results_interface](/help/results_interface.jpg){max-width=750px}
---
title: Help
title: Contributing to the Wiki
layout: article
navigation:
icon: 'md:help'
---
# Documentation
# Contributing to the Wiki
## DefenseFinder
[DefenseFinder](https://github.com/mdmparis/defense-finder) is a software to detect defense systems from bacterial genomes.
It takes as input a fasta file, nucleic or proteic (it will guess which).
On the web service page, users can upload (1) their fasta file. One can upload multiple fasta files at once, as many jobs will be run.
Users need to provide a name for the job (2) being submitted before clicking on the submit button (3).
Once a job is submitted, the page is redirected to the "Analyses" panel (4) where results of the past runs can be found.
![webservice_interface](/help/webservice_interface.jpg){max-width=750px}
The result consists in 3 tables :
- Systems table : One system per line. On the column type, there is the name of the system, and one can click on it to be redirected to the corresponding wiki page.
- Genes table : One gene per line. Those are genes from the aforementioned system, with some addition information on the quality of the hit. The key between both table is `sys_id`
- HMMER table : One gene per line. Here it's all the genes hit by a hmm profile, even when the gene is not part of a defense system.
## Contributing to the Wiki
### 1/ Create an account
## 1/ Create an account
The wiki is based on gitlab pages, and we are using the gitlab's instance of the Pasteur Institute. To contribute, users need to be part of the project.
......@@ -43,7 +22,7 @@ Once your account is created, you need to request access to the project, on the
Click, and wait for an admin approval.
### 2/ Edit a page
## 2/ Edit a page
Once you have access to the project (the previous step is done once), you can edit easily each page of the wiki, and post [issues](https://gitlab.pasteur.fr/mdm-lab/wiki/-/issues) (if you have question about something or remarks with anything from content to design).
......@@ -65,7 +44,7 @@ To do so, just fill in the description (1) of what you did, or anything that you
![Create MR](/help/Create_MR.png){max-width=750px}
### 3/ Tips to write Markdown
## 3/ Tips to write Markdown
As a general advice, check an already written file to see how other pages are written.<br><br>
......
navigation.icon: "md:help"
---
title: General Concepts
toc: true
layout: article
layout: article-no-toc
---
# General concepts of defense systems
This section is empty. You can help by adding to it.
\ No newline at end of file
In the following pages are presented different general concepts that are useful to better comprehend the world of defense systems.
You'll find information on :
1. [Abortive infection](/general-concepts/abortive-infection)
2. [Triggers of defense systems](/general-concepts/defense-systems_trigger)
3. [Effectors of defense systems](/general-concepts/defense-systems-effectors)
4. [How defense systems were and are discovered](/general-concepts/defense-systems-discovery)
5. [Defense Islands](/general-concepts/defense-islands)
6. [Defensive domains](/general-concepts/defensive-domains)
7. [MGE and defense systems](/general-concepts/mge-defense-systems)
8. [Anti defense systems](/general-concepts/anti-defense-systems)
\ No newline at end of file
---
title: Abortive Infection
layout: article
toc: true
contributors:
- Lucas Paoli
relevantAbstracts:
- doi: 10.1128/jb.68.1.36-42.1954
- doi: 10.1016/0006-3002(61)90455-3
- doi: 10.1016/0022-2836(68)90078-8
- doi: 10.1128/jvi.4.2.162-168.1969
- doi: 10.1128/jvi.13.4.870-880.1974
- doi: 10.1128/mr.45.1.52-71.1981
- doi: 10.3168/jds.S0022-0302(90)78904-7
- doi: 10.1016/S0960-9822(00)00124-X
- doi: 10.1111/j.1365-2958.1995.tb02255.x
- doi: 10.1016/j.mib.2005.06.006
- doi: 10.1146/annurev-virology-011620-040628
- doi: 10.1016/j.mib.2023.102312
- doi: 10.1038/s41579-023-00934-x
---
This section is empty. You can help by adding to it.
The term abortive infection was coined in the 1950s :ref{doi=10.1128/jb.68.1.36-42.1954}
to describe the observations that a fraction of the bacterial population did not support phage replication.
This phenomenon, also called phage exclusion, was identified in multiple systems across the following decades
:ref{doi=10.1016/0006-3002(61)90455-3,10.1016/0022-2836(68)90078-8,10.1128/jvi.4.2.162-168.1969,10.1128/jvi.13.4.870-880.1974}
and reviewed extensively :ref{doi=10.1128/mr.45.1.52-71.1981,10.3168/jds.S0022-0302(90)78904-7,10.1111/j.1365-2958.1995.tb02255.x}.
In the following years, and through the resolution of molecular mechanisms of key defense systems such as Rex or Lit, abortive infection became synonymous with infection-induced controlled cell-death.
Controlled cell death upon detection of the phage infection stops the propagation of the phage and protects the rest of the bacterial population
:ref{doi=10.1016/S0960-9822(00)00124-X,10.1016/j.mib.2005.06.006}.
Abortive infection can thus be thought of as a form of bacterial altruism.
With the recent developments in phage-defense systems and microbial immunity (see :ref{doi=10.1038/s41579-023-00934-x} for a review), many newly identifed anti-phage defense systems are thought to function through abortive infection. Abortive defense systems often detect the phage infection at the later stage through protein sensing or the monitoring of host integrity but can also be based on nucleic acid sensing. Upon sensing, a diverse set of effectors can be used to reduce metabolism or induce cell-death (e.g., NAD+ depletion, translation interruption or membrane depolarisation). The diversity of and mechanisms of abortive infection were recently reviewd here :ref{doi=10.1146/annurev-virology-011620-040628}, while the evolutionary success of this paradoxical altruistic form of immunity has recently been discussed here :ref{doi=10.1016/j.mib.2023.102312}.
Although abortive infection is currently often understood as leading to cell-death, it should be noted that its original definition appeared to be broader and that some mechanisms currently included as abortive infection may only lead to metabolic stalling or dormancy.
## test article
---
title: Defense Islands
---
This section is empty. You can help by adding to it.
\ No newline at end of file
......@@ -2,28 +2,23 @@
title: Defense system triggers
contributors:
- Avigail Stokar-Avihail
- Alba Herrero del Valle
layout: article
---
# How anti-phage systems sense invading phages
Upon phage infection, the bacterial immune system senses a specific phage component or modification that the phage exerts on the cell to elicit the bacterial immune response. Understanding how bacteria sense phage infection is a fundamental question, which remains unanswered for the majority of recently discovered immune systems. There are dozens of cases in which the mechanism of immunity has been elucidated, but the phage trigger remains elusive. Understanding how antiphage systems are activated is key for a full understanding of bacterial immunity and for repurposing them as molecular tools as has been done for restriction enzymes and CRISPR-Cas.
## Diversity
Various determinants of the phage can elicit bacterial immunity either in a direct or indirect manner. The most common and well known prokaryotic anti-phage systems, restriction enzymes and CRISPR-Cas, recognize and cleave phage DNA or RNA. More recently, a CBASS system has been found to directly bind to a structured phage RNA that triggers immune activation1. In other cases, defense systems are activated by protein coding phage genes. In some cases, the phage protein is directly sensed by the defense systems, as has been beautifully demonstrated for the Avs systems that directly bind either the phage terminase or portal protein2. In other cases, the phage protein can be sensed indirectly by the defense system, for example by detecting its activity in the cell. Such an indirect mechanism has been found for example in the case of some retron defense systems that are triggered by phage tampering with the RecBCD protein complex3,4. For a comprehensive coverage of all recent phage detection mechanisms the recent review by Huiting and Bondy-Denomy5 is highly recommended.
Various determinants of the phage can elicit bacterial immunity either in a direct or indirect manner. The most common and well known prokaryotic anti-phage systems, restriction enzymes and CRISPR-Cas, recognize and cleave phage DNA or RNA. More recently, a CBASS system has been found to directly bind to a structured phage RNA that triggers immune activation :ref{doi=10.1101/2023.03.07.531596}. In other cases, defense systems are activated by protein coding phage genes. In some cases, the phage protein is directly sensed by the defense systems, as has been beautifully demonstrated for the Avs systems that directly bind either the phage terminase or portal protein :ref{doi=10.1126/science.abm4096}. In other cases, the phage protein can be sensed indirectly by the defense system, for example by detecting its activity in the cell. Such an indirect mechanism has been found for example in the case of some retron defense systems that are triggered by phage tampering with the RecBCD protein complex :ref{doi=10.1016/j.cell.2020.09.065,10.1016/j.cell.2023.02.029}. For a comprehensive coverage of all recent phage detection mechanisms the recent review by Huiting and Bondy-Denomy :ref{doi=10.1016/j.mib.2023.102325} is highly recommended.
## Method of discovery:
The main method used to pinpoint phage components that trigger a specific defense system of interest has been through a simple classic genetics approach, whereby mutant phages that overcome the defense system are examined. Such mutants often occur spontaneously and can thus be selected for by simply picking phage plaques that are able to form on a lawn of bacteria expressing the defense system4,5. The hypothesis is that the phage mutant escapes bacterial immunity due to a mutation in the component sensed by the system. Thus, sequencing these phage mutants and identification of the mutated locus is the first required step. To validate that the mutated phage component is indeed the actual trigger of the defense system, follow up experiments are required. For example, in some cases expression of this phage component without any other phage genes is sufficient to elicit the activity of bacterial immune system. This approach was used to identify Borvo activation by expression of the phage DNA polymerase4, Dazbog activation by expression of a phage DNA methylase4, retron activation by either phage SSB proteins4 or by proteins that inhibit the host RecBCD3, CapRel triggering by the phage Capsid protein6 and many more5. Additional biochemical pulldown assays can be used to assess binding of the defense system to the suspected phage trigger.
One major caveat in the above approach is that in some cases mutant phages that escape the immune system cannot be isolated. This can occur for example if the defense system senses a general fold of a highly conserved and essential phage protein. In this case a simple mutation in the protein will not suffice for the phage to escape detection. In such cases, an alternative approach can be used that does not rely on isolation of escape mutants. An overexpression library of all phage genes can be co-expressed with the defense system of interest, and then assayed for immune activation. This approach was successfully applied for identification phage components that trigger diverse Avs systems2.
## General concepts:
Although much is still unknown regarding how bacterial immune systems sense phage infection, by combining the data observed so far, several general concepts in immune sensing are beginning to come to light. First, mechanistically diverse immune systems appear to have converged to sense common conserved phage components4. These include the phage core replication machinery, host takeover machinery and structural components. Second, several studies have found cases in which defense occurs in a multi-layered fashion, whereby a second system is activated when the first one fails3,7,8. Research in upcoming years is expected to reveal additional guiding principles in the ways bacteria detect phages.
## References:
1. Banh D V, Roberts C G, Amador A M, Brady S F, & Marraffini L A. (2023) Bacterial cGAS senses a viral RNA to initiate immunity. bioRxiv 2023.03.07.531596 doi:10.1101/2023.03.07.531596.
2. Gao L A, Wilkinson M E, Strecker J, Makarova K S, Macrae R K, Koonin E V, & Zhang F. (2022) Prokaryotic innate immunity through pattern recognition of conserved viral proteins. Science 377: eabm4096.
3. Millman A, Bernheim A, Stokar-Avihail A, Fedorenko T, Voichek M, Leavitt A, Oppenheimer-Shaanan Y, & Sorek R. (2020) Bacterial Retrons Function In Anti-Phage Defense. Cell 183: 1551–1561.
4. Stokar-Avihail A, Fedorenko T, Hör J, Garb J, Leavitt A, Millman A, Shulman G, Wojtania N, Melamed S, Amitai G, & Sorek R. (2023) Discovery of phage determinants that confer sensitivity to bacterial immune systems. Cell 186: 1863-1876.e16.
5. Huiting E & Bondy-Denomy J. (2023) Defining the expanding mechanisms of phage-mediated activation of bacterial immunity. Curr. Opin. Microbiol. 74: 102325.
6. Zhang T, Tamman H, Coppieters ’t Wallant K, Kurata T, LeRoux M, Srikant S, Brodiazhenko T, Cepauskas A, Talavera A, Martens C, Atkinson G C, Hauryliuk V, Garcia-Pino A, & Laub M T. (2022) Direct activation of a bacterial innate immune system by a viral capsid protein. Nature 612: 132–140.
7. Rousset F, Depardieu F, Miele S, Dowding J, Laval A-L, Lieberman E, Garry D, Rocha E P C, Bernheim A, & Bikard D. (2022) Phages and their satellites encode hotspots of antiviral systems. Cell Host Microbe 30: 740–753.
8. Penner M, Morad I, Snyder L, & Kaufmann G. (1995) Phage T4-coded Stp: Double-edged effector of coupled DNA and tRNA-restriction systems. J. Mol. Biol. 249: 857–68.
The main method used to pinpoint phage components that trigger a specific defense system of interest has been through a simple classic genetics approach, whereby mutant phages that overcome the defense system are examined. Such mutants often occur spontaneously and can thus be selected for by simply picking phage plaques that are able to form on a lawn of bacteria expressing the defense system :ref{doi=10.1016/j.cell.2023.02.029,10.1016/j.mib.2023.102325}. The hypothesis is that the phage mutant escapes bacterial immunity due to a mutation in the component sensed by the system. Thus, sequencing these phage mutants and identification of the mutated locus is the first required step. To validate that the mutated phage component is indeed the actual trigger of the defense system, follow up experiments are required. For example, in some cases expression of this phage component without any other phage genes is sufficient to elicit the activity of bacterial immune system. This approach was used to identify Borvo activation by expression of the phage DNA polymerase, Dazbog activation by expression of a phage DNA methylase, retron activation by either phage SSB proteins :ref{doi=10.1016/j.cell.2023.02.029} or by proteins that inhibit the host RecBCD3, CapRel triggering by the phage Capsid protein :ref{doi=10.1038/s41586-022-05444-z} and many more :ref{doi=10.1016/j.mib.2023.102325}. Additional biochemical pulldown assays can be used to assess binding of the defense system to the suspected phage trigger.
One major caveat in the above approach is that in some cases mutant phages that escape the immune system cannot be isolated. This can occur for example if the defense system senses a general fold of a highly conserved and essential phage protein. In this case a simple mutation in the protein will not suffice for the phage to escape detection. In such cases, an alternative approach can be used that does not rely on isolation of escape mutants. An overexpression library of all phage genes can be co-expressed with the defense system of interest, and then assayed for immune activation. This approach was successfully applied for identification phage components that trigger diverse Avs systems :ref{doi=10.1126/science.abm4096}.
## General concepts
Although much is still unknown regarding how bacterial immune systems sense phage infection, by combining the data observed so far, several general concepts in immune sensing are beginning to come to light. First, mechanistically diverse immune systems appear to have converged to sense common conserved phage components4. These include the phage core replication machinery, host takeover machinery and structural components. Second, several studies have found cases in which defense occurs in a multi-layered fashion, whereby a second system is activated when the first one fails :ref{doi=10.1016/j.cell.2020.09.065,10.1016/j.chom.2022.02.018,10.1006/jmbi.1995.0343}. Research in upcoming years is expected to reveal additional guiding principles in the ways bacteria detect phages.
---
title: DefenseFinder effectors
layout: article
relevantAbstracts:
- doi: 10.1038/s41579-023-00934-x
contributors:
- Héloïse Georjon
---
# Defense systems effectors
Most of the anti-phage defense systems of bacteria can be described as a combination of two main components.
First, a sensing component that detects phage infection to trigger the immune response
(see [defense-systems_trigger](/general-concepts/defense-systems_trigger/)).
Second, an effector component that mediates the immune response following the detection of phage infection.
The effector components of anti-phage systems are very diverse, and can be arbitrarily distributed in broad categories :ref{doi=10.1038/s41579-023-00934-x} :
## Nucleic-acid-degrading effectors.
Many defense systems target (either through cleavage or modification) nucleic acids to mediate the immune response.
These nucleic acids targeting systems are divided between systems that specifically target phage nucleic acids to stop
phage replication, and systems that untargetedly affect bacterial and viral nucleic acids to halt the growth of both the
infected host and the phage.
Nucleic-acid-degrading systems include [RM](/defense-systems/rm), [CRISPR-Cas](/defense-systems/cas), [Ssp](/defense-systems/sspbcde) and [Ddn](/defense-systems/dnd), certain types of [CBASS](/defense-systems/cbass), [Avs](/defense-systems/avs) and [Lamassu](/defense-systems/lamassu-fam), [PrrC](/defense-systems/prrc), [RloC](/defense-systems/rloc)...
## Nucleotide-modifying effectors.
Other types of defense systems target the nucleotide pool of the infected cell.
For instance, Viperins produce modified nucleotides that inhibit phage transcription; defensive dCTP deaminases and dGTPases respectively
degrade CTP and GTP to halt phage infection; [Thoeris](/defense-systems/thoeris), [DSR](/defense-systems/dsr) and certain types of [pAgo](/defense-systems/pago) and [CBASS](/defense-systems/cbass) degrade NAD+ to cause growth arrest of the infected host.
## Membrane-disrupting effectors.
Many defense systems encode proteins that disrupt the membrane integrity of the infected cell
(by opening pores, targeting the membrane phospholipids or through transmembrane domains), leading to growth arrest.
They include for instance bacterial Gasdermins, RexAB, Pif, AbiZ, certain types of [pAgo](/defense-systems/pago), [retrons](/defense-systems/retron), [CBASS](/defense-systems/cbass), [PYCSAR](/defense-systems/pycsar) and [Avs](/defense-systems/avs) systems.
## Other types of effectors.
Finally, some types of less prevalent effectors were not included into these broad categories. This includes protein modifying effectors, and some chemical defense systems.
---
title: Discovery of defense systems
layout: article
toc: true
contributors:
- Helena Shomar
---
# Discovery of defense systems
Anti-phage defense systems have been discovered through various research methodologies and scientific investigations.
The first defense systems that were discovered and characterized were restriction modifications (RM) and CRISPR-cas systems, in the 1960s and early 2000s respectively. These systems are the most abundantly encoded in prokaryotic genomes and were discovered by researchers that observed heritable bacterial resistance of certain strains to bacteriophages. A combination of functional studies, bacterial genetics, and biochemical assays enabled to elucidate their mechanisms of action, leading to the development of tools that revolutionized molecular biology and genetic engineering.
In recent years, the discovery and characterization of dozens of novel anti-phage defense systems involve a combination of bioinformatics, genomics analysis and experimental approaches. The computational pipeline that has allowed to identify and validate numerous systems in the past years is based on the observation that anti-phage defense systems tend to co-localize on prokaryotic chromosomes in regions denoted as defense islands. Using this principle, recent studies have discovered more than 150 novel systems, by identifying and testing single or multi protein uncharacterized systems that are enriched within such defense islands. Candidate systems are typically cloned into heterologous expression hosts, to validate their anti-phage function. The mechanisms of many these newly discovered systems remain unknown.
---
title: Defense Islands
layout: article
relevantAbstracts:
- doi: 10.1128/JB.05535-11
- doi: 10.1126/science.aar4120
- doi: 10.1016/j.chom.2022.09.017
contributors:
- Ernest Mordret
---
# Defense Islands
**Defense islands** are regions of prokaryotic genomes enriched in defense systems. Their existence first described in Makarova *et al.* :ref{doi=10.1128/JB.05535-11}, who observed that genes encoding defense systems (mainly Restriction Modification enzymes, Toxin-Antitoxin systems, but notably not CRISPR) tended to cluster preferentially on specific portions of bacterial genomes. They postulated that unknown genes commonly found associated to these regions would likely have a defensive role themselves, and confirmed bioinformatically that many of them were indeed diverged versions of classical defense systems. Other systems of genes commonly found in defense islands were later isolated and heterologously expressed to experimentally confirm to have a defensive role (BREX, DISARM). Doron *et al.* :ref{doi=10.1126/science.aar4120}, later followed by Millmann *et al.* :ref{doi=10.1016/j.chom.2022.09.017}, used the colocalization of genes in defense islands to generate many candidate systems and test them experimentally in high throughput screens, leading to the discovery of a large number of new defense systems.
The reasons leading to the formation and maintenance of defense islands are still unclear. Makarova *et al.* :ref{doi=10.1128/JB.05535-11} observed a that defense islands often associated with mobile genetic elements, suggesting that defense systems travel through horizontal gene transfer, taking advantage of the MGEs' mobility. This observation in itself could explain the non-random localization of defense systems in the preferred "landing pads" (=*sinks*) of mobile genetic elements. Whether the colocalization of defense systems into these islands is purely due to there horizontal transmission, or whether they reflect a deeper functional implication such as coregulation and coordination, remains debated.