Skip to content

Commit

Permalink
Built site for gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Quarto GHA Workflow Runner committed Apr 30, 2024
1 parent dd77ca3 commit b5c4183
Show file tree
Hide file tree
Showing 9 changed files with 307 additions and 177 deletions.
2 changes: 1 addition & 1 deletion .nojekyll
Original file line number Diff line number Diff line change
@@ -1 +1 @@
f317a5e4
ec56c8ab
2 changes: 1 addition & 1 deletion index-preview.html
Original file line number Diff line number Diff line change
Expand Up @@ -1298,7 +1298,7 @@ <h2 class="unnumbered anchored" data-anchor-id="references">References</h2>
}
}
});
</script> </div> <!-- /content --> <script>var lightboxQuarto = GLightbox({"loop":false,"selector":".lightbox","closeEffect":"zoom","openEffect":"zoom","descPosition":"bottom"});
</script> </div> <!-- /content --> <script>var lightboxQuarto = GLightbox({"openEffect":"zoom","selector":".lightbox","loop":false,"closeEffect":"zoom","descPosition":"bottom"});
window.onload = () => {
lightboxQuarto.on('slide_before_load', (data) => {
const { slideIndex, slideNode, slideConfig, player, trigger } = data;
Expand Down
44 changes: 22 additions & 22 deletions index.embed.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"\n",
"Here, we are gonna analyze the relation between transcription factor binding (ESRRA binding data) from a ChIP-Seq experiment and the genome-wide associations between DNA variants and phenotypes like diseases. For this task, we are gonna use a the `gwascat` package distributed by the **EMBL** (European Molecular Biology Laboratories)."
],
"id": "b4b8eac6-fe07-4393-af3c-34487f4031fa"
"id": "1dde25b9-078b-476e-b0d2-fc780e20b497"
},
{
"cell_type": "code",
Expand Down Expand Up @@ -286,15 +286,15 @@
"source": [
"library(tidyverse)"
],
"id": "69d92163-e302-4348-a220-5ceda2dcb105"
"id": "b260ab66-c086-495e-a4d3-590df558587a"
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"First, we need to download the data, keep the 24 chromosomes (from 1 to Y) and, specify the sequence information from the GRCh38 human genome annotation."
],
"id": "3e2951f4-ec50-4312-a4c7-148d44beb16f"
"id": "3c718fb1-17fb-410c-b1b4-a52b6d68f5a4"
},
{
"cell_type": "code",
Expand Down Expand Up @@ -328,15 +328,15 @@
"\n",
"gg = gwcat |> as_GRanges()"
],
"id": "c4089353-f16f-44a2-adc7-9fdb21de25c9"
"id": "be4979c0-0e8f-4a60-b608-e1ef875587f1"
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now, let’s plot a karyogram that will show the SNP’s identified with significant associations with a phenotype. The SNP’s in the GWAS catalog have a stringent criterion of significance and there has been a replication of the finding from a independent population."
],
"id": "31aaebaf-f7cf-4d8e-ad4c-bcc5f2cfafa5"
"id": "09c6ae75-ff84-491f-92b6-c924b79fa111"
},
{
"cell_type": "code",
Expand Down Expand Up @@ -373,15 +373,15 @@
"source": [
"ggbio::autoplot(gg, layout=\"karyogram\")"
],
"id": "7397edc6-b245-41f1-a511-3f058cb2cdae"
"id": "c6969933-2d93-4ed2-bfb2-907dc269c1a4"
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can see the peak data as a `GRanges` object:"
],
"id": "9e08ff18-4235-4602-bf43-3deee26ffa63"
"id": "1146a264-92d5-4c12-9dbd-bfb1460ae742"
},
{
"cell_type": "code",
Expand Down Expand Up @@ -429,15 +429,15 @@
"\n",
"GM12878"
],
"id": "03078248-d873-4d8e-a55f-3ee79a2ea47e"
"id": "3ba97276-91c9-4781-a771-acb8a239dfdd"
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"If we see the bottom of the `GRanges` table, this experiment have the hg19 annotation from the human genome. To work on the GRCh38 annotation we need to lift-over with a `.chain` file. For this we can use the `AnnotationHub` package."
],
"id": "6543721c-743f-472f-97c1-a1998f2a41fd"
"id": "cf651e9f-9a6d-44fb-b13a-b6688eea6748"
},
{
"cell_type": "code",
Expand Down Expand Up @@ -555,7 +555,7 @@
"source": [
"library(AnnotationHub)"
],
"id": "9f2a09c2-325f-4208-b531-bb96d61995fb"
"id": "bd9538b6-f977-4270-8aa7-3e445a3a9b79"
},
{
"cell_type": "code",
Expand All @@ -574,7 +574,7 @@
"seqlevelsStyle(GM12878) <- \"UCSC\"\n",
"seqlevelsStyle(gg) <- \"UCSC\""
],
"id": "d67c54bf-9073-4d84-9a83-71948fc8943a"
"id": "c6dd9dbf-094b-4c1f-a02b-7e8bb6d75b94"
},
{
"cell_type": "markdown",
Expand All @@ -584,7 +584,7 @@
"\n",
"We can see the duplications with the `reduce` function from `IRanges` package:"
],
"id": "ce65f74c-0385-48b7-bdf3-802733dbe090"
"id": "d4be86bc-0fd2-47d9-b792-cf1c2bb3cd4d"
},
{
"cell_type": "code",
Expand All @@ -603,15 +603,15 @@
"# duplicated loci\n",
"length(gg) - length(reduce(gg))"
],
"id": "5b69414b-28eb-4952-8281-24efb9f64040"
"id": "67347415-d15d-4521-ba9b-084617243fc4"
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can see that there are `261160` duplicated loci. Let’s find the overlap between the *reduced* catalog and the ChIP-Seq experiment:"
],
"id": "f77a6b4c-23ac-4315-9aad-cc4d42549164"
"id": "aa5ad83a-5d1c-4e28-8f1e-e8441eb33e25"
},
{
"cell_type": "code",
Expand Down Expand Up @@ -646,15 +646,15 @@
"fo = findOverlaps(GM12878, reduce(gg))\n",
"fo"
],
"id": "0617ce03-ee9b-465a-9787-7394b9774e44"
"id": "ff9024a9-f5db-4acb-bf9c-1e41c4568f27"
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can see 613 hits. Then, we are gonna eobtain the ranges from those hits, retrieve the phenotypes (DISEASE/TRAIT) and show the top 20 most common phenotypes with association to SNPs that lies on the ESRRA binding peaks."
],
"id": "fef5d949-9e49-4469-9619-dc354a36d3e8"
"id": "12beecb2-5ab9-4c8f-865e-2811575db5e6"
},
{
"cell_type": "code",
Expand Down Expand Up @@ -705,15 +705,15 @@
"\n",
"htmltools::tagList(list(plotly::ggplotly(p)))"
],
"id": "c822db21-9033-4c6a-8137-61fdc3e8ee9d"
"id": "81c02982-536f-43e4-8e18-2b2020a66cf7"
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Distinct phenotypes identified on the peaks:"
],
"id": "0bbf067a-c088-4be6-8828-62c5d8e0465a"
"id": "4d4b0f9d-77ce-47c1-807d-cb390638008b"
},
{
"cell_type": "code",
Expand All @@ -731,15 +731,15 @@
"source": [
"length(phset)"
],
"id": "e12820ff-a29b-44ed-a6c1-a48d868cae6d"
"id": "c9c177fa-449e-4eb7-90f8-3730521a951f"
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now, how to do the inference of these phenotype on peaks of these b cells? We can use permutation on the genomic positions to test if the number of phenotypes found is due to chance or not."
],
"id": "824687a1-80c8-4e2a-afe9-e00f96247554"
"id": "804c21fc-c50a-4ac9-b237-2b26d3777bb0"
},
{
"cell_type": "code",
Expand Down Expand Up @@ -1011,7 +1011,7 @@
"source": [
"library(ph525x)"
],
"id": "fab7c5c4-190b-4cf2-8d53-2c58e5f8ffee"
"id": "c34348cd-2bf9-4603-8af6-9b61e69075b1"
},
{
"cell_type": "markdown",
Expand All @@ -1025,7 +1025,7 @@
"\n",
"## References"
],
"id": "a340632e-c94c-4d24-995b-fdaafc074a7c"
"id": "598bfe0a-ce1e-44a5-a9b5-9e48b89753a5"
}
],
"nbformat": 4,
Expand Down
Loading

0 comments on commit b5c4183

Please sign in to comment.