Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…-practices into fix/mamba
  • Loading branch information
Zethson committed Aug 9, 2024
2 parents 7f925f9 + e45ea77 commit 12a6ad0
Show file tree
Hide file tree
Showing 29 changed files with 121 additions and 121 deletions.
14 changes: 7 additions & 7 deletions jupyter-book/air_repertoire/clonotype.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"\n",
":::{warning}\n",
"Scirpy changed the format of [its datastructure](https://scirpy.scverse.org/en/latest/data-structure.html#storing-airr-rearrangement-data-in-anndata)\n",
"with v0.13. While the overall anlaysis workflow has not changed, some outputs shown in this chapter might not be accurate anymore. \n",
"with v0.13. While the overall analysis workflow has not changed, some outputs shown in this chapter might not be accurate anymore. \n",
"\n",
"See [the scirpy release notes](https://scirpy.scverse.org/en/latest/changelog.html#v0-13-0-new-data-structure-based-on-awkward-arrays) for more details about this change. \n",
"Until we update this chapter, please also refer to the [official scirpy documentation](https://scirpy.scverse.org).\n",
Expand Down Expand Up @@ -314,7 +314,7 @@
"id": "c1cf919e",
"metadata": {},
"source": [
"Once the identity between T-cells is obtained for V(D)J CDR3, it is time to define the cluster of cells corresponding to one specific clonotype. A clonotype will be a set of cells with identical sequences, considering the parameters used in the previous step. However, it is possible to define clonotypes as a set of cells with just identical VJ or just identical VDJ sequences. Furthermore, it is possible definding the clonotypes by comparing either or both pairs of VJ or VDJ sequences.\n",
"Once the identity between T-cells is obtained for V(D)J CDR3, it is time to define the cluster of cells corresponding to one specific clonotype. A clonotype will be a set of cells with identical sequences, considering the parameters used in the previous step. However, it is possible to define clonotypes as a set of cells with just identical VJ or just identical VDJ sequences. Furthermore, it is possible defining the clonotypes by comparing either or both pairs of VJ or VDJ sequences.\n",
"\n",
"The set of parameters to define clonotypes should be the same as used previously. In our case, the sequences of amino acids must be compared using identity as a metric. In addition, we are setting the additional parameters to define clonotypes if the V(D)J are identical using the most abundant pair as the target sequence."
]
Expand Down Expand Up @@ -1678,7 +1678,7 @@
"source": [
"So far, we have shown all the analyses you can perform to characterize the T-cell receptor repertoire, including the cell clones' identification and expansion. Besides, the representation in both, cell clusters and biological samples. Furthermore, the sequence motif for V(D)J gene segments, which is highlighted by interpretation of gene usage and spectratype results.\n",
"\n",
"Those methods could be applied to characterize B-cell receptors as well {cite}`gupta2015change`. However, over the lifetime of B-cells mutual mutations occur in the V gene segment helping the low-affinity receptors to aquire a high affinity phenotype. This process is known as **affinity maturation**, and the high rate of mutual mutations (~10000 more than germline cells) is called **somatic hypermutation** {cite}`papavasiliou2002somatic`. Therefore, the clonotype definition for B-cells should take this phenomenon into account. One way to deal with this is through distance-based clonotype analysis.\n",
"Those methods could be applied to characterize B-cell receptors as well {cite}`gupta2015change`. However, over the lifetime of B-cells mutual mutations occur in the V gene segment helping the low-affinity receptors to acquire a high affinity phenotype. This process is known as **affinity maturation**, and the high rate of mutual mutations (~10000 more than germline cells) is called **somatic hypermutation** {cite}`papavasiliou2002somatic`. Therefore, the clonotype definition for B-cells should take this phenomenon into account. One way to deal with this is through distance-based clonotype analysis.\n",
"\n",
"Here, we use **Dandelion**, a python library focused on BCR analysis which interoperates with *Scanpy* and *Scirpy* and provides a BCR distance-based method for clone definition, which is explained below in more detail {cite}`stephenson2021single`."
]
Expand Down Expand Up @@ -2240,7 +2240,7 @@
"id": "018129e2",
"metadata": {},
"source": [
"Compared to *Scirpy*, the clonotypes visualization in *Dandelion* does not show their sizes (number of cells). This process should be done separately, i.e., first, it is necessary to calculate the size of the clones and transfer this information to the *annData* object to performe the visualization via *Scanpy*."
"Compared to *Scirpy*, the clonotypes visualization in *Dandelion* does not show their sizes (number of cells). This process should be done separately, i.e., first, it is necessary to calculate the size of the clones and transfer this information to the *annData* object to perform the visualization via *Scanpy*."
]
},
{
Expand Down Expand Up @@ -2393,7 +2393,7 @@
"id": "9837bcde",
"metadata": {},
"source": [
"As you can appreciate before, **IGHV3-48** and **IGHV1-18** were the gene segments consistently more abundants in comparison to the rest of the segments in the plot, providing evidence of strong V gene preferiantial usage for the samples analyzed here.\n",
"As you can appreciate before, **IGHV3-48** and **IGHV1-18** were the gene segments consistently more abundant in comparison to the rest of the segments in the plot, providing evidence of strong V gene preferential usage for the samples analyzed here.\n",
"\n",
"The previous analysis can be improved by just adding information for the visualization. For example, let us see if those privilege V segments are shared between isotypes."
]
Expand Down Expand Up @@ -2488,7 +2488,7 @@
"\n",
"We have identified key expanded clonotypes and the isotype they represented. In addition, we can explore spectratype to observe the dominance in terms of sequence length. As well as in the previous analysis, we discarded the multi-chain cells, and we conserved those clonotypes whose sizes were higher than 50 cells to keep the analysis consistency.\n",
"\n",
"The plot below shown an interesting behaviour, despite the clear spectratype dominance reflected in our previous TCR analysis. Here, two squence lengths rased, the first and the most dominant conformed by sequences of 23 aminoacids, and the second one composed by 15 aminoacids."
"The plot below shown an interesting behaviour, despite the clear spectratype dominance reflected in our previous TCR analysis. Here, two sequence lengths raised, the first and the most dominant conformed by sequences of 23 aminoacids, and the second one composed by 15 aminoacids."
]
},
{
Expand Down Expand Up @@ -2586,7 +2586,7 @@
"\n",
"![](../_static/images/air_repertoire/bcr_logo_motif.svg)\n",
"\n",
"On the other hand, we analyzed the same V gene segments for the V(D)J chain but with a sequence lentgh of 23 aminoacids."
"On the other hand, we analyzed the same V gene segments for the V(D)J chain but with a sequence length of 23 aminoacids."
]
},
{
Expand Down
18 changes: 9 additions & 9 deletions jupyter-book/air_repertoire/ir_profiling.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"- **Fc receptors**: Epitope-antibody complex\n",
"- **Cytokine receptors**: Cytokines\n",
"- **B-cell receptor (BCRs)**: Epitopes\n",
"- **T-cell recpetors (TCRs)**: Linear epitopes bound to the Major Histocompatibility Complex (MHC)"
"- **T-cell receptors (TCRs)**: Linear epitopes bound to the Major Histocompatibility Complex (MHC)"
]
},
{
Expand Down Expand Up @@ -82,11 +82,11 @@
"\n",
"- **Fluorescence Activated Cell Sorting (FACS)** is a method based on flow cytometry with the power to label the cells of interest based on fluorescent probes over the raw cell suspension. A cell suspension is carried by a rapidly flowing stream of liquid. This stream of cells is broken up into individual droplets through a vibrating mechanism. Just before the stream breaks into droplets, the flow passes through a fluorescence measuring station where the fluorescence signal of every cell is measured. The droplets can be further charged for further separations.\n",
"\n",
"- **Magnetic-Activated Cell Sorting (MACS)** can use antibodies, enzymes, lectins, or strepavidins attached to a magnetic bead to label the target cells. Once the cells are labeled from the raw suspension, a magnetic field is applied to attract the magnetic beads and discard the remaining cells from the suspensions. The targeted cells are collected once the magnetic field is turned off. One advantage of this method is the capacity to collect targeted cells with no specific markers to be labeled, in that case, a cocktail of markers is used to label the untargeted cells, and the cells of interests are collected by washing them out once the magnetic field captures the untargeted cells conjugated to a magnetic bead.\n",
"- **Magnetic-Activated Cell Sorting (MACS)** can use antibodies, enzymes, lectins, or streptavidins attached to a magnetic bead to label the target cells. Once the cells are labeled from the raw suspension, a magnetic field is applied to attract the magnetic beads and discard the remaining cells from the suspensions. The targeted cells are collected once the magnetic field is turned off. One advantage of this method is the capacity to collect targeted cells with no specific markers to be labeled, in that case, a cocktail of markers is used to label the untargeted cells, and the cells of interests are collected by washing them out once the magnetic field captures the untargeted cells conjugated to a magnetic bead.\n",
"\n",
"- **Laser Capture Microdissection (LCM)** has the power to extract cell populations or single cells from microscope preparations without detriment of the surrounding tissue. The components to perform LCM includes a reverse micrsocope, a laser control unit, a microscope joy stick to plate stabilization, a CCD camera, and a color monitor. The idea behind LCM consists on labelling cells by visual detection of morphological characteristics of target cells, the plate is immobilized and the laser pulse melts the thin thermoplastic film removing the cells or cells of interest without any damage to the surrounding tissue.\n",
"- **Laser Capture Microdissection (LCM)** has the power to extract cell populations or single cells from microscope preparations without detriment of the surrounding tissue. The components to perform LCM includes a reverse microscope, a laser control unit, a microscope joy stick to plate stabilization, a CCD camera, and a color monitor. The idea behind LCM consists on labelling cells by visual detection of morphological characteristics of target cells, the plate is immobilized and the laser pulse melts the thin thermoplastic film removing the cells or cells of interest without any damage to the surrounding tissue.\n",
"\n",
"- **Microfluidics** is a versatile method able to work with small quantities of raw suspension even at the order of nanoliters. There are different kinds of microfluidic approaches including cell-affinity chromatographu based microfluidics, physical characteristics of cell based microfluidics, immunomagnetics beads based microfluidics, and separation by dielectric properties of some cell-types based microfluifdics. The most used microfluidics based method is the chromatographic separation using a chip assay as stationary phase which is modified to include the necessary antibodies to capture the target cells in the mobile phase. After the buffer flows off from the chip, a solution is used to separate the cells attached to the antibodies to collect them for further analysis {cite}`hu2016single`.\n",
"- **Microfluidics** is a versatile method able to work with small quantities of raw suspension even at the order of nanoliters. There are different kinds of microfluidic approaches including cell-affinity chromatography based microfluidics, physical characteristics of cell based microfluidics, immunomagnetics beads based microfluidics, and separation by dielectric properties of some cell-types based microfluifdics. The most used microfluidics based method is the chromatographic separation using a chip assay as stationary phase which is modified to include the necessary antibodies to capture the target cells in the mobile phase. After the buffer flows off from the chip, a solution is used to separate the cells attached to the antibodies to collect them for further analysis {cite}`hu2016single`.\n",
"\n",
"### Immune receptor sequencing\n",
"\n",
Expand Down Expand Up @@ -195,15 +195,15 @@
"metadata": {},
"source": [
"## Load data\n",
"In this tutorial we will mainly use two python packages for loading, cell-level ordering, and visualiation:\n",
"In this tutorial we will mainly use two python packages for loading, cell-level ordering, and visualization:\n",
"- **Scanpy**: general package for single cell analysis (https://github.com/theislab/scanpy, {cite}`wolf2018scanpy`)\n",
"- **Scirpy**: scanpy extension for immune receptor analysis (https://github.com/scverse/scirpy, {cite}`sturm2020scirpy`)\n",
"\n",
"Here, we only showcase IR analysis with Scirpy. However, there exist several tools with similar functionality such as immunarch(R, {cite}`immunomind2019`), scRepertoire (R, {cite}`borcherding2020screpertoire`), and dandelion (R, {cite}`stephenson2021single`), and Platypus (R, {cite}`yermanos2021platypus`) reviewed in {cite}`valkiers2022recent`. \n",
"\n",
":::{warning}\n",
"Scirpy changed the format of [its datastructure](https://scirpy.scverse.org/en/latest/data-structure.html#storing-airr-rearrangement-data-in-anndata)\n",
"with v0.13. While the overall anlaysis workflow has not changed, some outputs shown in this chapter might not be accurate anymore. \n",
"with v0.13. While the overall analysis workflow has not changed, some outputs shown in this chapter might not be accurate anymore. \n",
"\n",
"See [the scirpy release notes](https://scirpy.scverse.org/en/latest/changelog.html#v0-13-0-new-data-structure-based-on-awkward-arrays) for more details about this change. \n",
"Until we update this chapter, please also refer to the [official scirpy documentation](https://scirpy.scverse.org).\n",
Expand Down Expand Up @@ -502,7 +502,7 @@
"- **barcode**: tag of the cell the contig was measured from\n",
"- **is_cell**: indicates whether the barcode is associated with a cell\n",
"- **high_confidence**: confidence of the measurement being a IR\n",
"- **chain**: chain of the IR (e.g. TRA: T Cell Receptor α-chain, IGH: Immuneglobulin Heavy chain)\n",
"- **chain**: chain of the IR (e.g. TRA: T Cell Receptor α-chain, IGH: Immunoglobulin Heavy chain)\n",
"- **{v,d,j,c}_gene**: gene used to form the specific segment of the IR\n",
"- **full_length**: whether the full IR was captured (see below)\n",
"- **productive**: whether the IR is productive (see below)\n",
Expand Down Expand Up @@ -662,7 +662,7 @@
"id": "a4b42743",
"metadata": {},
"source": [
"Example 2: Contigs express full length but there is not identifieable CDR3."
"Example 2: Contigs express full length but there is not identifiable CDR3."
]
},
{
Expand Down Expand Up @@ -1421,7 +1421,7 @@
"id": "e2633249",
"metadata": {},
"source": [
"Notice, that the patient-level information is not automatically added here. Let's add them by loading the raw data, alligning them on a cell level and indexing them by their barcode. "
"Notice, that the patient-level information is not automatically added here. Let's add them by loading the raw data, aligning them on a cell level and indexing them by their barcode. "
]
},
{
Expand Down
Loading

0 comments on commit 12a6ad0

Please sign in to comment.