<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Simulation tests</title><link>https://sourceforge.net/p/human-te-dynamics/wiki/Simulation%2520tests/</link><description>Recent changes to Simulation tests</description><atom:link href="https://sourceforge.net/p/human-te-dynamics/wiki/Simulation%20tests/feed" rel="self"/><language>en</language><lastBuildDate>Tue, 14 Dec 2021 09:27:01 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/human-te-dynamics/wiki/Simulation%20tests/feed" rel="self" type="application/rss+xml"/><item><title>Simulation tests modified by Florian Schwarz</title><link>https://sourceforge.net/p/human-te-dynamics/wiki/Simulation%2520tests/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v5
+++ v6
@@ -85,5 +85,6 @@

 Actual HGDP Datasets
 ---
-Third step of simulation studies: Using a few actual datasets
-ADD TO SOURCEFORGE REPOSITORY
+To further test the reliability of the set of SCGs, we scanned the results of three HGDP datasets before starting the actual pipeline.
+These files were produced in the same way as files for the full HGDP pipeline (see section 'Analysis Pipeline').
+The three files used for this analysis are stored in the folder 'realdatatest'.
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Florian Schwarz</dc:creator><pubDate>Tue, 14 Dec 2021 09:27:01 -0000</pubDate><guid>https://sourceforge.net76827e2819a7b8908d9152dd42d9d6908003ffa0</guid></item><item><title>Simulation tests modified by Florian Schwarz</title><link>https://sourceforge.net/p/human-te-dynamics/wiki/Simulation%2520tests/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v4
+++ v5
@@ -30,7 +30,7 @@
 For this purpose we use SimulaTE.
 See the SimulaTE walkthrough (https://sourceforge.net/p/simulates/wiki/Home/) for an in-detail explanation of the software.
 In this application, a 4 MB chassis sequence was used (FILENAME, WHERE PROVIDED?).
-In this chassis, we randomly insert 1 copy of each SCG and KRAB-ZNF and 5 copies of each TE from the reference sequence library using a modified version of the ‘define-landscape’ script  (‘define-landscape-flo’).
+In this chassis, we randomly insert 1 copy of each SCG and KRAB-ZNF and 5 copies of each TE from the reference sequence library using a modified version of the ‘define-landscape’ script  (‘define-landscape-flo’) which can be found in the simulaTE sourceforge repository at https://sourceforge.net/p/simulates/code/HEAD/tree/tmp/ .

 Commands:
 Define landscape:
@@ -45,7 +45,7 @@
 ~~~
 python2.7 create-reads-for-human.py --fasta genome_simulate_4MBchassis_reflib_v6.2_countte5_countkrab1.pg --coverage 35 --read-length 150 --method uniform --error-rate 0 --output genome_simulate_4MBchassis_reflib_v6.2_countte5_countkrab1_cov35_rl150_uniform_error0.fastq
 ~~~
-The script 'create-reads-for-human.py' is modified from its original simulaTE version and is available in the svn repository of this project in the folder 'scripts'.
+The script 'create-reads-for-human.py' is modified from its original simulaTE version and is available in the svn repository of the Human TE project (i.e. this project) in the folder 'scripts'.

 Map artificial reads to reference library:
 ~~~
@@ -68,6 +68,20 @@
 In these simulations, we no longer use an artificial genome with a known number of TE, SCG and Krab insertions to create the artificial reads. Instead, we use the actual human genome with its respective number of insertions. The main focus here was to identify SCGs that are not consistently estimated with a copy number of ~1.
 All artificial reads were created solely with a coverage of 5x as the previous simulations have revealed no influences of coverage fluctuations on copy number estimates.

+Create artificial reads from human reference genome (for this example, we use the default parameters for this analysis, i.e. 5x coverage, 150bp read length, uniform sampling distribution and error rate of 0):
+~~~
+python2.7 human-te-dynamics-svn/scripts/create-reads-for-human.py --fasta human-data/simulation-tests/humangenome-artificialreads/GCA_000001405.15_GRCh38_no_alt_analysis_set.fna --coverage 5 --read-length 50 --method uniform --output hg38_cov5x_rl50_noerror_uniform.fastq&amp;amp;
+~~~
+Map to reference library:
+~~~
+bwa mem -t 20 human-te-dynamics-svn/refg/reflibrary_humans_v6.2.fasta hg38_cov5x_rl50_noerror_uniform.fastq &amp;gt; map_hg38_cov5x_rl50_noerror_uniform_to_reflib_v6.2.sam&amp;amp;
+~~~
+Calculate average copy number, i.e. create the mapstat file:
+~~~
+python3 human-te-dynamics-svn/scripts/humante-mapstat-weight.py --sam map_hg38_cov5x_rl50_noerror_uniform_to_reflib_v6.2.sam --min-mq 10 --fai human-te-dynamics-svn/refg/reflibrary_humans_v6.2.fasta.fai &amp;gt; mapstat_hg38_cov5x_rl50_noerror_uniform_to_reflib_v6.2_weighted.txt&amp;amp;
+~~~
+
+To see how we analyzed the data from the simulation, see R markdown documentation available in the 'simulation-tests' directory.

 Actual HGDP Datasets
 ---
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Florian Schwarz</dc:creator><pubDate>Thu, 09 Dec 2021 10:59:09 -0000</pubDate><guid>https://sourceforge.netd544ec63130c5113861d3b9541834a1625d175a7</guid></item><item><title>Simulation tests modified by Florian Schwarz</title><link>https://sourceforge.net/p/human-te-dynamics/wiki/Simulation%2520tests/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v3
+++ v4
@@ -10,20 +10,21 @@

 The Idea of these simulations was to test which parameters for sequencing input data could have an influence on abundance differences using the established reference library.
 The simulations were also used iteratively to identify SCG sequences vulnerable to coverage estimate fluctuations caused by changes in sequencing data parameters.
+Relevant files are found in the folder 'simulation-tests' in the data repository.

 Artificial Genome
 ----
 The first step of the simulations aims to test the accuracy of copy number estimation for all sequences by using a simulated genome into which SCG, TE and KRAB sequences are inserted with a fixed copy number.
 Thus, we have a ‘true’ value which can be compared to the copy number estimate to infer the quality of estimation for sequences and identify sequences vulnerable to fluctuations due to differences in the input data.

-We fluctuate the following parameter (default parameters are shown in &lt;b&gt;bold&lt;/b&gt;):
+For creating the artificial reads, we fluctuate the following parameter (default parameters are shown in &lt;b&gt;bold&lt;/b&gt;):
 --coverage: 5, &lt;b&gt;35&lt;/b&gt;,75
 --read-length: 50, 100, &lt;b&gt;150&lt;/b&gt;, 200
 --method: &lt;b&gt;uniform&lt;/b&gt;, random
 --error-rate &lt;b&gt;0&lt;/b&gt;, 0.01,0.05

-THESE PARAMETERS MEAN THE FOLLOWING:
-
+A uniform sampling method means that each position in the genome has equal coverage, while random introduces a random effect and thus different positions in the genome can have a different coverage.
+An error rate of 0.01 implies that 1 out of every 100 bases is randomly mutated.

 First, we need to create the simulated genome.
 For this purpose we use SimulaTE.
@@ -44,20 +45,22 @@
 ~~~
 python2.7 create-reads-for-human.py --fasta genome_simulate_4MBchassis_reflib_v6.2_countte5_countkrab1.pg --coverage 35 --read-length 150 --method uniform --error-rate 0 --output genome_simulate_4MBchassis_reflib_v6.2_countte5_countkrab1_cov35_rl150_uniform_error0.fastq
 ~~~
+The script 'create-reads-for-human.py' is modified from its original simulaTE version and is available in the svn repository of this project in the folder 'scripts'.
+
 Map artificial reads to reference library:
 ~~~
 bwa mem -t 20 reflibrary_humans_v6.2.fasta genome_simulate_4MBchassis_reflib_v6.2_countte5_countkrab1_cov35_rl150_uniform_error0.fastq &amp;gt;map_cov35_rl150_uniform_error0_to_reflib_v6.2.sam
 ~~~
 The majority of the artificial reads and mapping files are omitted from the sourceforge repository due to their size. However, one of each is included for demonstration and troubleshooting purposes.

-
 Make mapstat file:
 ~~~
-python3 human-te-dynamics-svn/humante-mapstat-weight.py --min-mq 10 --fai reflibrary_humans_v6.2.fasta.fai --sam map_cov35_rl150_uniform_error0_to_reflib_v6.2.sam &amp;gt;mapstat_cov35_rl150_uniform_error0_to_reflib_v6.2_weighted.txt
+python3 humante-mapstat-weight.py --min-mq 10 --fai reflibrary_humans_v6.2.fasta.fai --sam map_cov35_rl150_uniform_error0_to_reflib_v6.2.sam &amp;gt;mapstat_cov35_rl150_uniform_error0_to_reflib_v6.2_weighted.txt
 ~~~

+This script is incorporated in the full analysis pipeline and is explained in more detail in the 'Analysis pipeline' section of this Wiki.

-To see how we analyzed the data from the simulation, see R markdown documentation (PATH).
+To see how we analyzed the data from the simulation, see R markdown documentation available in the 'simulation-tests' directory.


 Human reference genome
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Florian Schwarz</dc:creator><pubDate>Tue, 07 Dec 2021 13:01:07 -0000</pubDate><guid>https://sourceforge.net4ab691d02ddf873ea5e3b496c14b500e53aa2af9</guid></item><item><title>Simulation tests modified by Florian Schwarz</title><link>https://sourceforge.net/p/human-te-dynamics/wiki/Simulation%2520tests/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -16,11 +16,11 @@
 The first step of the simulations aims to test the accuracy of copy number estimation for all sequences by using a simulated genome into which SCG, TE and KRAB sequences are inserted with a fixed copy number.
 Thus, we have a ‘true’ value which can be compared to the copy number estimate to infer the quality of estimation for sequences and identify sequences vulnerable to fluctuations due to differences in the input data.

-We fluctuate the following parameter (default parameters are shown in *bold*):
---coverage: 5, *35*,75
---read-length: 50, 100, *150*, 200
---method: *uniform*, random
---error-rate *0*, 0.01,0.05
+We fluctuate the following parameter (default parameters are shown in &lt;b&gt;bold&lt;/b&gt;):
+--coverage: 5, &lt;b&gt;35&lt;/b&gt;,75
+--read-length: 50, 100, &lt;b&gt;150&lt;/b&gt;, 200
+--method: &lt;b&gt;uniform&lt;/b&gt;, random
+--error-rate &lt;b&gt;0&lt;/b&gt;, 0.01,0.05

 THESE PARAMETERS MEAN THE FOLLOWING:

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Florian Schwarz</dc:creator><pubDate>Tue, 07 Dec 2021 10:51:12 -0000</pubDate><guid>https://sourceforge.netd1bbf7929dc34394a94690243abc602a60439afc</guid></item><item><title>Simulation tests modified by Florian Schwarz</title><link>https://sourceforge.net/p/human-te-dynamics/wiki/Simulation%2520tests/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -16,11 +16,11 @@
 The first step of the simulations aims to test the accuracy of copy number estimation for all sequences by using a simulated genome into which SCG, TE and KRAB sequences are inserted with a fixed copy number.
 Thus, we have a ‘true’ value which can be compared to the copy number estimate to infer the quality of estimation for sequences and identify sequences vulnerable to fluctuations due to differences in the input data.

-We fluctuate the following parameter (default parameters are marked with (d)):
---coverage: 5, 35(d),75
---read-length: 50, 100, 150(d), 200
---method: uniform(d), random
---error-rate 0(d), 0.01,0.05
+We fluctuate the following parameter (default parameters are shown in *bold*):
+--coverage: 5, *35*,75
+--read-length: 50, 100, *150*, 200
+--method: *uniform*, random
+--error-rate *0*, 0.01,0.05

 THESE PARAMETERS MEAN THE FOLLOWING:

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Florian Schwarz</dc:creator><pubDate>Tue, 07 Dec 2021 10:50:11 -0000</pubDate><guid>https://sourceforge.netf66f70493e725d80c74f02b883b68e4eba631919</guid></item><item><title>Simulation tests modified by Florian Schwarz</title><link>https://sourceforge.net/p/human-te-dynamics/wiki/Simulation%2520tests/</link><description>&lt;div class="markdown_content"&gt;&lt;h1 id="simulation-tests"&gt;Simulation tests&lt;/h1&gt;
&lt;p&gt;Requirements:&lt;br/&gt;
SimulaTE&lt;br/&gt;
bwa&lt;br/&gt;
samtools&lt;br/&gt;
Python2&lt;br/&gt;
Python3&lt;/p&gt;
&lt;p&gt;The Idea of these simulations was to test which parameters for sequencing input data could have an influence on abundance differences using the established reference library.&lt;br/&gt;
The simulations were also used iteratively to identify SCG sequences vulnerable to coverage estimate fluctuations caused by changes in sequencing data parameters.&lt;/p&gt;
&lt;h2 id="artificial-genome"&gt;Artificial Genome&lt;/h2&gt;
&lt;p&gt;The first step of the simulations aims to test the accuracy of copy number estimation for all sequences by using a simulated genome into which SCG, TE and KRAB sequences are inserted with a fixed copy number.&lt;br/&gt;
Thus, we have a ‘true’ value which can be compared to the copy number estimate to infer the quality of estimation for sequences and identify sequences vulnerable to fluctuations due to differences in the input data.&lt;/p&gt;
&lt;p&gt;We fluctuate the following parameter (default parameters are marked with (d)):&lt;br/&gt;
--coverage: 5, 35(d),75&lt;br/&gt;
--read-length: 50, 100, 150(d), 200&lt;br/&gt;
--method: uniform(d), random&lt;br/&gt;
--error-rate 0(d), 0.01,0.05&lt;/p&gt;
&lt;p&gt;THESE PARAMETERS MEAN THE FOLLOWING:&lt;/p&gt;
&lt;p&gt;First, we need to create the simulated genome.&lt;br/&gt;
For this purpose we use SimulaTE.&lt;br/&gt;
See the SimulaTE walkthrough (https://sourceforge.net/p/simulates/wiki/Home/) for an in-detail explanation of the software.&lt;br/&gt;
In this application, a 4 MB chassis sequence was used (FILENAME, WHERE PROVIDED?).&lt;br/&gt;
In this chassis, we randomly insert 1 copy of each SCG and KRAB-ZNF and 5 copies of each TE from the reference sequence library using a modified version of the ‘define-landscape’ script  (‘define-landscape-flo’).&lt;/p&gt;
&lt;p&gt;Commands:&lt;br/&gt;
Define landscape:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;python2.7 define-landscape-flo.py --chassis chassis_4MB.fasta --te-seqs reflibrary_humans_v6.2.fasta --output genome_simulate_4MBchassis_reflib_v6.2_countte5_countkrab1.pgd --count-te 5 --count-krab 1
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Build genome:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;python2.7 build-population-genome.py --pgd genome_simulate_4MBchassis_reflib_v6.2_countte5_countkrab1.txt --chassis chassis_4MB.fasta --te-seqs reflibrary_humans_v6.2.fasta --output genome_simulate_4MBchassis_reflib_v6.2_countte5_countkrab1.pg
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Create artificial reads:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nv"&gt;python2&lt;/span&gt;.&lt;span class="mi"&gt;7&lt;/span&gt; &lt;span class="nv"&gt;create&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;reads&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;human&lt;/span&gt;.&lt;span class="nv"&gt;py&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nv"&gt;fasta&lt;/span&gt; &lt;span class="nv"&gt;genome_simulate_4MBchassis_reflib_v6&lt;/span&gt;.&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="nv"&gt;_countte5_countkrab1&lt;/span&gt;.&lt;span class="nv"&gt;pg&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nv"&gt;coverage&lt;/span&gt; &lt;span class="mi"&gt;35&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nv"&gt;read&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;length&lt;/span&gt; &lt;span class="mi"&gt;150&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nv"&gt;method&lt;/span&gt; &lt;span class="nv"&gt;uniform&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nv"&gt;error&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;rate&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nv"&gt;output&lt;/span&gt; &lt;span class="nv"&gt;genome_simulate_4MBchassis_reflib_v6&lt;/span&gt;.&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="nv"&gt;_countte5_countkrab1_cov35_rl150_uniform_error0&lt;/span&gt;.&lt;span class="nv"&gt;fastq&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Map artificial reads to reference library:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;bwa mem -t 20 reflibrary_humans_v6.2.fasta genome_simulate_4MBchassis_reflib_v6.2_countte5_countkrab1_cov35_rl150_uniform_error0.fastq &amp;gt;map_cov35_rl150_uniform_error0_to_reflib_v6.2.sam
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The majority of the artificial reads and mapping files are omitted from the sourceforge repository due to their size. However, one of each is included for demonstration and troubleshooting purposes.&lt;/p&gt;
&lt;p&gt;Make mapstat file:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;python3 human-te-dynamics-svn/humante-mapstat-weight.py --min-mq 10 --fai reflibrary_humans_v6.2.fasta.fai --sam map_cov35_rl150_uniform_error0_to_reflib_v6.2.sam &amp;gt;mapstat_cov35_rl150_uniform_error0_to_reflib_v6.2_weighted.txt
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;To see how we analyzed the data from the simulation, see R markdown documentation (PATH).&lt;/p&gt;
&lt;h2 id="human-reference-genome"&gt;Human reference genome&lt;/h2&gt;
&lt;p&gt;In these simulations, we no longer use an artificial genome with a known number of TE, SCG and Krab insertions to create the artificial reads. Instead, we use the actual human genome with its respective number of insertions. The main focus here was to identify SCGs that are not consistently estimated with a copy number of ~1.&lt;br/&gt;
All artificial reads were created solely with a coverage of 5x as the previous simulations have revealed no influences of coverage fluctuations on copy number estimates.&lt;/p&gt;
&lt;h2 id="actual-hgdp-datasets"&gt;Actual HGDP Datasets&lt;/h2&gt;
&lt;p&gt;Third step of simulation studies: Using a few actual datasets&lt;br/&gt;
ADD TO SOURCEFORGE REPOSITORY&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Florian Schwarz</dc:creator><pubDate>Tue, 07 Dec 2021 10:48:19 -0000</pubDate><guid>https://sourceforge.netc9a57345a222a8f088957f71eeedb459f7bc9b22</guid></item></channel></rss>