From 69b607afc604f310295fee0c78248f0c2d68f501 Mon Sep 17 00:00:00 2001 From: Samuel Ortion Date: Tue, 16 Apr 2024 18:42:44 +0200 Subject: [PATCH] feat: Add auto-loading bespoke org config fix: Typo review from v0.2 --- report.org | 40 ++++++++++++++++-------- report.pdf | 4 +-- setup.org | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 119 insertions(+), 14 deletions(-) create mode 100644 setup.org diff --git a/report.org b/report.org index 7f03b27..3391403 100644 --- a/report.org +++ b/report.org @@ -1,7 +1,7 @@ #+title: Further development on FTAG Finder, a pipeline to identify Gene Families and Tandemly Arrayed Genes #+author: Samuel Ortion #+date: 2023-2024 -#+LATEX_CLASS: scientific-project +#+LATEX_CLASS: lamme2024 #+LATEX_CLASS_OPTIONS: [twoside=false] #+LATEX_HEADER: \usepackage{sty/lamme2024} @@ -12,8 +12,10 @@ #+MACRO: conditional-header (eval (concat "#+header: :results output " (print-to-string org-export-current-backend))) # ref. conditional-header https://emacs.stackexchange.com/a/64340/41374 + # ref. https://write.as/dani/writing-a-phd-thesis-with-org-mode + #+name: acronyms | key | abbreviation | full form | |------------+--------------+--------------------------------------------| @@ -27,7 +29,7 @@ |----------------------+----------------------+-------------------------------------------------------------------------------------------------------------------------------| | singleton | singleton | A gene with a single copy | | polyploidisation | polyploidisation | Mechanism leading to the acquisition of at least three versions of the same original genome in a species | -| pseudogene | pseudogene | A gene like sequence that lost its capacity to transcribe | +| pseudogene | pseudogene | A gene-like sequence that lost its capacity to transcribe | | segment_duplcation | segment duplication | Long stretches of DNA sequences with high identity score | | retroduplication | retroduplication | Duplication of a gene through retro-transcription of its RNA transcript | | autopolyploidisation | autopolyploidisation | Polyploidisation within the same species | @@ -92,23 +94,24 @@ Duplicate genes offers a pool of genetic material available for further experime Multiple mechanisms may lead to a gene duplication. Their effect ranges from the duplication of the whole genome to the duplication of a fragment of a gene. *** Whole genome duplication and polyploidisation -In an event of gls:WGD, the entire set of genes present on the chromosomes is duplicated ([[cref:fig:gene-duplication-mechanisms]] (A)). +During an event of gls:WGD, the entire set of genes present on the chromosomes is duplicated ([[cref:fig:gene-duplication-mechanisms]] (A)). gls:WGD can occur thanks to gls:polyspermy or in case of a non-reduced gamete. Gls:polyploidisation is a mechanism leading to a species with at least three copies of an initial genome. -A striking example is probably /Triticum aestivum/ (wheat) which is hexaploid\footenote{An hexaploid cell have three pairs of homologous chromosomes} due to several hybridisation events [cite:@golovninaMolecularPhylogenyGenus2007a]. +A striking example is probably /Triticum aestivum/ (wheat) which is hexaploid[fn:hexaploid: An hexaploid cell have three pairs of homologous chromosomes.] due to several hybridisation events [cite:@golovninaMolecularPhylogenyGenus2007a]. + We distinguish two kinds of glspl:polyploidisation, based on the origin of the duplicate genome: (i) Gls:allopolyploidisation occurs when the supplementary chromosomes come from a divergent species. This is the case for /Triticum aestivum/ hybridisation, which consisted in the union of the chromosome set of a /Triticum/ species with those of an /Aegilops/ species. (ii) Gls:autopolyploidisation consists in the hybridisation or duplication of the whole genome within the same species. *** Unequal crossing-over -Another source of gene duplication relies on unequal crossing-over. During cell division, a crossing-over occurs when two chromatids exchange fragments of chromosome. If the cleavage of the two chromatids occurs at different positions, the shared fragments may have different lengths. Homologous recombination of such uneven crossing-over results in the incorporation of a duplicate region, as depicted in cref:fig:gene-duplication-mechanisms (B, C). +Another source of gene duplication relies on unequal crossing-over. During cell division, a crossing-over occurs when two chromatids exchange fragments of chromosome. If the cleavage of the two chromatids occurs at different positions, the shared fragments may have different lengths. Homologous recombination of such uneven crossing-over leads to the incorporation of a duplicate region, as depicted in cref:fig:gene-duplication-mechanisms (B, C). This mechanism leads to the duplication of the whole set of genes present in the fragment. These duplicate genes locate one set after the other: we call them gls:TAG. Gls:TAG are the kind of gene duplication we will be particularly interested in during this internship. *** Retroduplication -Transposable elements plays a major role in genome plasticity, and enable gene duplication too. +Transposable elements play a major role in genome plasticity, and enable gene duplication too. Retrotransposons, or RNA transposons are one type of transposable elements. They share similar structure and replication mechanisms with retroviruses. Retrotransposons replicate in the genome through a mechanism known as "copy-and-paste". -These transposons typically contain a reverse transcriptase gene. This enzyme proceed in the reverse transcription of an mRNA transcript into its reverse, complementary DNA sequence which can then insert elsewhere in the genome. -More generally, gls:retroduplication refers to the duplication of a sequence through reverse transcription of a RNA transcript. Gene duplicated through retroduplication lose their intronic sequences and bring a polyA tail with them in their new locus (cref:fig:gene-duplication-mechanisms (D)). +These transposons typically contain a reverse transcriptase gene. This enzyme proceeds in the reverse transcription of an mRNA transcript into its reverse complementary DNA sequence which can then insert elsewhere in the genome. +More generally, gls:retroduplication refers to the duplication of a sequence through reverse transcription of a RNA transcript. Genes duplicated through retroduplication lose their intronic sequences and bring a polyA tail with them in their new locus (cref:fig:gene-duplication-mechanisms (D)). *** Transduplication DNA transposons are another kind of transposable elements whose transposition mechanism can also lead to gene duplication. @@ -117,7 +120,7 @@ A typical DNA transposon contains a transposase gene. This enzyme recognizes two *** Segment duplication Finally, glspl:segment_duplication, also called /low copy repeats/ are long stretches of DNA with high identity score ([[cref:fig:gene-duplication-mechanisms]] (F)). Their exact duplication mechanism remains unclear [cite:@lallemandOverviewDuplicatedGene2020]. They may come from an accidental replication, distinct from an uneven cross-over or a double stranded breakage. -Transposable elements may well be involved in the mechanism, as a high enrichment of transposable elements has been found at duplicate segments extremities, in /Drosophila/ [cite:@lallemandOverviewDuplicatedGene2020]. +Transposable elements may well be involved in the mechanism, as a high enrichment of transposable elements is found next to duplicate segment extremities, in /Drosophila/ [cite:@lallemandOverviewDuplicatedGene2020]. ** Fate of duplicate genes in genome evolution In his book /Evolution by Gene Duplication/, Susumu [[latex:textsc][Ohno]] proposed that gene duplication plays a major role in species evolution [cite:@ohnoEvolutionGeneDuplication1970], because it provides new genetic materials to build on new phenotypes while keeping a backup gene for the previous function. @@ -127,13 +130,13 @@ Indeed, duplicate genes may evolve after duplication: they may be inactivated, b Duplicate genes may be inactivated and become pseudogenes. These pseudogenes keep a gene-like structure, which degrades as and when further genome modifications occur. However, they are no longer expressed. *** Neofunctionalization Duplicate genes may be conserved and gain a new function. -For instance, in the set of olfactory receptor genes result from several duplication and deletion events (in /Drosophila/: [cite:@nozawaEvolutionaryDynamicsOlfactory2007]), after which the duplicate may specialize in the detection of a particular chemical compound. +For instance, the current set of olfactory receptor genes result from several duplication and deletion events (in /Drosophila/: [cite/t:@nozawaEvolutionaryDynamicsOlfactory2007]), after which the duplicate olfactory genes specialized in the detection of particular chemical compounds. *** Subfunctionalization Two duplicate genes with the same original function may encounter a gls:subfunctionalization by which each gene conserves only one part of the function. *** Functional redundancy -The two gene copies may keep the ancestral function: in this case the organism may increase the quantity of gene product. +The two gene copies may keep the ancestral function: in this case the quantity of gene product may increase. ** Methods to identify duplicate genes -[cite:@lallemandOverviewDuplicatedGene2020] review the different methods used to detect duplicate genes. These methods depend on the type of duplicate genes they target and vary on computation burden as well as ease of use [cite:@lallemandOverviewDuplicatedGene2020]. + [[latex:textsc][Lallemand]] et al. review the different methods used to detect duplicate genes. These methods depend on the type of duplicate genes they target and vary on computation burden as well as ease of use [cite:@lallemandOverviewDuplicatedGene2020]. *** Paralog detection Paralogs are homologous genes derived from a duplication event. We can identify them as homologous genes coming from the same genome, or as homologous genes between different species once we filtered out gls:orthologues (homologous genes derived from a speciation event). @@ -211,3 +214,16 @@ Principle: construct vertex communities based on where an agent would get stuck # LocalWords: speciation Subfunctionalization Neofunctionalization # LocalWords: Pseudogenization +* Setup :noexport: + +#+name: startup +#+begin_src emacs-lisp +(org-babel-load-file "./setup.org") +#+end_src + +#+RESULTS: startup +: Loaded ./setup.el + +# Local Variables: +# eval: (progn (org-babel-goto-named-src-block "startup") (org-babel-execute-src-block) (outline-hide-sublevels 1)) +# End: diff --git a/report.pdf b/report.pdf index 9bd59a3..ecc374f 100644 --- a/report.pdf +++ b/report.pdf @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3a208138c7b9af707945b5659f0df46d116885bf91721c7317ce1805e7777c5f -size 180911 +oid sha256:d87e7035c51051c9357085f06e80d00a175aee5b7d93370d117dd0250c51200c +size 180869 diff --git a/setup.org b/setup.org new file mode 100644 index 0000000..63f2321 --- /dev/null +++ b/setup.org @@ -0,0 +1,89 @@ +#+title: Standalone Emacs Config file for my report +* I can set a variable at startup! + +Let's say I want this emacs-lisp code to be run at startup when I open my org file (say, for config purpose) +#+begin_src emacs-lisp :tangle yes +(setq lamme2024 "org powered") +#+end_src + +To do so, add the following somewhere in your =report.org= file: +#+begin_src org +#+name: startup +#+begin_src emacs-lisp +(org-babel-load-file "./setup.org") +#+end_src +#+end_src + +And add the following at the end of your =report.org= file: + +#+begin_src org +# Local Variables: +# eval: (progn (org-babel-goto-named-src-block "startup") (org-babel-execute-src-block) (outline-hide-sublevels 1)) +# End: +#+end_src + +The next time you will open your file, you will be asked twice if org-babel should run the =startup= cell. + +See: [[https://emacs.stackexchange.com/a/41456/41374]] + +* Configure LaTeX template + +#+begin_src emacs-lisp :tangle yes +(add-to-list 'org-latex-classes + '("lamme2024" + "\\documentclass{scrreprt} + [NO-DEFAULT-PACKAGES] + [EXTRA] + \\makeindex + \\makeglossaries " + ;("\\part{%s}" . "\\part*{%s}") + ("\\chapter{%s}" . "\\chapter{%s}") + ("\\section{%s}" . "\\section*{%s}") + ("\\subsection{%s}" . "\\subsection*{%s}") + ("\\subsubsection{%s}" . "\\subsubsection*{%s}") + ("\\paragraph{%s}" . "\\paragraph*{%s}") + ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))) +#+end_src + +#+RESULTS: +| lamme2024 | \documentclass{scrreprt} | + +* Add latex: link for custom latex macro text wrapping + +#+begin_src emacs-lisp + (org-add-link-type + "latex" nil + (lambda (path desc format) + (cond + ((eq format 'html) + (format "%s" path desc)) + ((eq format 'latex) + (format "\\%s{%s}" path desc))))) +#+end_src + +#+begin_src emacs-lisp :tangle yes +(org-add-link-type + "latex" nil + (lambda (path desc format) + (cond + ((eq format 'html) + (format "%s" path desc)) + ((eq format 'latex) + (format "\\%s{%s}" path desc))))) +#+end_src + +#+RESULTS: +: Created latex link. + + +* Extend org reference system + +#+begin_src emacs-lisp :tangle yes +(require 'org-ref) +(require 'org-ref-refproc) +(add-hook 'org-export-before-parsing-hook #'org-ref-acronyms-before-parsing) +(add-hook 'org-export-before-parsing-hook #'org-ref-glossary-before-parsing) +#+end_src + +#+RESULTS: +| org-ref-glossary-before-parsing | org-ref-acronyms-before-parsing | org-attach-expand-links |