Skip to content

Commit 6ffd2dc

Browse files
committed
Small coding updates, exemplary code, spacing of PDF slides.
1 parent 02d4ff9 commit 6ffd2dc

File tree

3 files changed

+20
-16
lines changed

3 files changed

+20
-16
lines changed

presentation/hybseq_course.tex

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@
6767
}
6868

6969
% Fixing space before and after block of code higlight
70-
\BeforeBeginEnvironment{bashcode}{\vspace{-0.5em}}
71-
\AfterEndEnvironment{bashcode}{\par\vspace{-0.5em}}
72-
\BeforeBeginEnvironment{spluscode}{\vspace{-0.5em}}
73-
\AfterEndEnvironment{spluscode}{\par\vspace{-0.5em}}
70+
\BeforeBeginEnvironment{bashcode}{\vspace{-0.25em}}
71+
\AfterEndEnvironment{bashcode}{\par\vspace{-0.25em}}
72+
\BeforeBeginEnvironment{spluscode}{\vspace{-0.25em}}
73+
\AfterEndEnvironment{spluscode}{\par\vspace{-0.25em}}
7474

7575
% % Fixing space before and after multicols region
7676
% \BeforeBeginEnvironment{multicols}{\vspace{-0.5em}}
@@ -381,7 +381,7 @@ \subsection{General data structure}
381381
I ├── Assembly_1 # Gene output directory
382382
I ├── ... # More gene output directories...
383383
I └── Assembly_16358 # Gene output directory...
384-
I # Plenty of reconstructed contigs, statistics, etc.
384+
I ... # Plenty of reconstructed contigs, statistics, etc.
385385
├── 3_aligned # Aligned contigs
386386
I ├── exons # Aligned exons
387387
I ├── introns # Aligned introns
@@ -429,6 +429,7 @@ \subsection{Data download and start}
429429
wget https://botany.natur.cuni.cz/zeisek/hybseq_course_zingibers_0_data.zip
430430
# Unpack it
431431
unzip hybseq_course_zingibers_0_data.zip
432+
ls -lha hybseq_course_zingibers/ # See it
432433
\end{bashcode}
433434
\begin{itemize}
434435
\item The archive contains input raw data and reference
@@ -977,13 +978,16 @@ \subsection{Post-processing gene trees}
977978
\end{itemize}
978979
\begin{bashcode}
979980
# Move qsub logs to the 'trees' directory
980-
cd ~/hybseq_course_zingibers/3_aligned/ && mv HybSeq.genetree.* trees/
981+
cd ~/hybseq_course_zingibers/3_aligned/ # Ensure to be in 3_aligned
982+
mv HybSeq.genetree.* trees/ # Move...
981983
# Everything should be moved from XXX/2_seqs/aligned to XXX/3_aligned
982-
mv trees ../4_gene_trees && cd ../
984+
mv trees ../4_gene_trees
985+
cd ../ && ls -lha
983986
# Post-process (sort into subdirectories and get lists of gene trees)
984987
# all gene trees - provide path to directory with gene trees files
985988
~/hybseq/bin/hybseq_5_gene_trees_4_postprocess.sh 4_gene_trees | tee \
986989
hybseq_gene_trees_postprocess.log
990+
mv hybseq_gene_trees_postprocess.log 4_gene_trees/ && ls -lha 4_gene_trees/
987991
\end{bashcode}
988992
\begin{itemize}
989993
\item Wait for tasks to finish, or \href{https://botany.natur.cuni.cz/zeisek/hybseq_course_zingibers_4_gene_trees.zip}{download} and inspect test data
@@ -1029,7 +1033,7 @@ \section{Comparing gene trees}
10291033
\begin{frame}[fragile]{Install needed R packages}
10301034
\begin{itemize}
10311035
\item The tasks will be done in \href{https://www.r-project.org/}{R} (use e.g. \href{https://posit.co/products/open-source/rstudio/}{RStudio} or \href{https://rkward.kde.org/}{RKWard})
1032-
\item Use your notebook or e.g. MetaCentrum \href{https://docs.metacentrum.cz/software/ondemand/}{OnDemand} RStudio or \href{https://docs.metacentrum.cz/related/jupyter/}{Jupyter notebook}
1036+
\item Use your notebook or e.g. MetaCentrum \href{https://docs.metacentrum.cz/en/docs/ondemand}{OnDemand} RStudio or \href{https://docs.metacentrum.cz/en/docs/related/jupyter}{Jupyter notebook}
10331037
\item Following R code is available at \url{https://github.com/V-Z/hybseq-course/blob/master/trees_filtration.r} --- \alert{\textbf{download} it and edit} according to your needs
10341038
\end{itemize}
10351039
\begin{spluscode}
@@ -1170,7 +1174,7 @@ \subsection{Filtering trees}
11701174
\begin{spluscode}
11711175
trees # See original trees
11721176
# Remove trees identified in the PCoA plot
1173-
trees[c("Assembly_1033", "Assembly_10103", "Assembly_10222")] <- NULL
1177+
trees[c("Assembly_1033", "Assembly_13627", "Assembly_15852")] <- NULL
11741178
trees # See new object
11751179
# Possibly remove trees with too few tips
11761180
print(trees, details=TRUE)
@@ -1536,7 +1540,7 @@ \subsection{Comparing trees}
15361540
# Pie chart: concordance (blue) top conflict (green), other conflict
15371541
# (red), no signal (gray). Run phypartspiecharts.py to get the graphics:
15381542
python phypartspiecharts.py --svg_name trees_good_res.svg \
1539-
parsimony_sp_tree.nwk trees_good_res 20
1543+
parsimony_sp_tree.nwk trees_good_res 221
15401544
\end{bashcode}
15411545
\end{frame}
15421546

presentation/pcoa.png

24.3 KB
Loading

trees_filtration.r

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ title("PCoA of matrix of pairwise trees distances")
4949

5050
# Remove outlying trees
5151
trees
52-
trees[c("Assembly_1033", "Assembly_10103", "Assembly_10222")] <- NULL
52+
trees[c("Assembly_1033", "Assembly_13627", "Assembly_15852")] <- NULL
5353
trees
5454

5555
# Now you can repeat recalculation of distance matrix and PCoA and possibly remove more trees...
@@ -111,12 +111,12 @@ plot.phylo(x = tree.sp2, type = "phylogram", edge.width = 2, label.offset = 0.01
111111

112112
# # Consensus networks
113113
# # Requires all trees to have same set of tips (no missing data)
114-
# # ?consensusNet
114+
# ?consensusNet
115115
# # Compute consensus network
116-
# # tree.net <- consensusNet(obj = trees.good, prob = 0.25)
116+
# tree.net <- consensusNet(obj = trees.good, prob = 0.25)
117117
# # Plot 2D or 3D
118-
# # plot(x = tree.net, planar = FALSE, type = "2D", use.edge.length = TRUE, show.tip.label = TRUE, show.edge.label = TRUE, show.node.label = TRUE, show.nodes = TRUE, edge.color = "black", tip.color = "blue") # 2D
119-
# # plot(x = tree.net, planar = FALSE, type = "3D", use.edge.length = TRUE, show.tip.label = TRUE, show.edge.label = TRUE, show.node.label = TRUE, show.nodes = TRUE, edge.color = "black", tip.color = "blue") # 3D
118+
# plot(x = tree.net, planar = FALSE, type = "2D", use.edge.length = TRUE, show.tip.label = TRUE, show.edge.label = TRUE, show.node.label = TRUE, show.nodes = TRUE, edge.color = "black", tip.color = "blue") # 2D
119+
# plot(x = tree.net, planar = FALSE, type = "3D", use.edge.length = TRUE, show.tip.label = TRUE, show.edge.label = TRUE, show.node.label = TRUE, show.nodes = TRUE, edge.color = "black", tip.color = "blue") # 3D
120120

121121
# Save trees.good in NEXUS for PhyloNet
122122
write.nexus(trees.good, file = "trees_good.nex", translate = FALSE)
@@ -146,6 +146,6 @@ densiTree(x = trees.ultra[1:10], scaleX = TRUE, width = 5, cex = 1.25)
146146
?phytools::densityTree
147147
# Plotting density trees
148148
densityTree(trees = c(tree.sp, tree.sp2), fix.depth = TRUE, lwd = 4)
149-
densityTree(trees = trees.ultra, fix.depth = TRUE, use.gradient = TRUE, alpha = 0.5, lwd = 4)
149+
# densityTree(trees = trees.ultra, fix.depth = TRUE, use.gradient = TRUE, alpha = 0.5, lwd = 4)
150150
# densityTree(trees = trees.ultra[1:3], fix.depth = TRUE, use.gradient = TRUE, alpha = 0.5, lwd = 4)
151151
# densityTree(trees = trees.ultra[c(2, 4, 6)], fix.depth = TRUE, use.gradient = TRUE, alpha = 0.5, lwd = 4)

0 commit comments

Comments
 (0)