SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
DWGSIM 0.1.4: whole genome NGS simulator nilshomer Bioinformatics 43 07-15-2012 06:46 AM
dwgsim read orientation av_d Bioinformatics 3 08-15-2011 08:48 PM
DWGSIM: whole genome NGS simulator nilshomer Bioinformatics 0 08-14-2011 04:50 PM
dwgsim to simulate Illumina reads gene coder Bioinformatics 1 07-07-2011 09:51 AM
dwgsim -> readnames and quality scores genome Bioinformatics 1 02-16-2011 06:17 PM

Reply
 
Thread Tools
Old 12-29-2010, 01:24 PM   #1
gprakhar
Member
 
Location: India

Join Date: Aug 2010
Posts: 78
Question dwgsim usage

I want to use dwgsim to generate CNVs and InDels.
Searched for documentation, didn't find anything useful except "http://sourceforge.net/apps/mediawiki/dnaa/index.php?title=Whole_Genome_Simulation".

Tried using it myself, its working, am getting an output, hence have some questions!

1) "chr1 763 A C -" what does this line of output mean?
As far as I can understand the program is taking Nucleotides from Ref Chr1, and changing them based on some parameter and then generating reads.
In short can you please explain the algorithm behind this??

In the output format, what is meant by "start end 1" & "start end 2" ?

2) Why does the program produce 3 output files(2 for bwa, 1 for BFast)?

Any help will be highly appreciated!!!
gprakhar is offline   Reply With Quote
Old 12-29-2010, 03:18 PM   #2
nilshomer
Nils Homer
 
nilshomer's Avatar
 
Location: Boston, MA, USA

Join Date: Nov 2008
Posts: 1,285
Default

Quote:
Originally Posted by gprakhar View Post
I want to use dwgsim to generate CNVs and InDels.
Searched for documentation, didn't find anything useful except "http://sourceforge.net/apps/mediawiki/dnaa/index.php?title=Whole_Genome_Simulation".

Tried using it myself, its working, am getting an output, hence have some questions!
The source code is the best documentation. This simulator is forked off of the SAMtools simulator, which was modified from the MAQ simulator. It does not simulate CNVs, but only small indels, SNPs, and a single type of sequencing error (base change).

Quote:
Originally Posted by gprakhar View Post
1) "chr1 763 A C -" what does this line of output mean?
As far as I can understand the program is taking Nucleotides from Ref Chr1, and changing them based on some parameter and then generating reads.
In short can you please explain the algorithm behind this??
It randomly adds SNPs and inserts/deletes bases at the given rates (-r/-R) in the given reference. The indel length is determined by an exponential distribution (-X). Then reads are simulated from this mutated genome with the given error rate (-e). Paired end reads' insert size are also drawn from an distribution. See the source code for more details.

Quote:
Originally Posted by gprakhar View Post
In the output format, what is meant by "start end 1" & "start end 2" ?
The start positions in the reference from where the two paired end reads were drawn.

Quote:
Originally Posted by gprakhar View Post
2) Why does the program produce 3 output files(2 for bwa, 1 for BFast)?

Any help will be highly appreciated!!!
So we can test BWA and BFAST on the same datasets. BWA requires two files, one for each paired end, while BFAST requires an aggregated file.
nilshomer is offline   Reply With Quote
Old 12-29-2010, 03:51 PM   #3
gprakhar
Member
 
Location: India

Join Date: Aug 2010
Posts: 78
Default

Thank you for the help.
I do agree that Source Code is the best documentation, still I will try and create a manual, as I learn about the tool.
We have a CNV detection tool which we want to test. Hence I wanted simulated data with CNV at known locations.

Any simulators for this particular job?

SV simulation from the PEMer pacakage looks good, but I am having trouble compiling it.
gprakhar is offline   Reply With Quote
Old 03-21-2011, 08:04 AM   #4
Alex8
Member
 
Location: Europe

Join Date: Oct 2010
Posts: 10
Default

Hello, Nils,
I have a problem obtaining color-space simulation reads.
The output BFAST looks OK:

@gi|12057207|gb|AE001439.1|_637443_636958_1_1_1:0:0_0:0:0_0
A21322003132201120203003022220220001033010212331013
+
11111111111111111111111111111111111111111111111111
...

But the two BWA files contain nucleotide reads:

@gi|12057207|gb|AE001439.1|_637444_636959_1_1_1:0:0_0:0:0_0/2
CTGGAATCTGGACCGAGATAATAGGGGAGGAAACATTACAGCGTTCACT
+
1111111111111111111111111111111111111111111111111
...

Is is intended? How to get BWA files in color-space?

Regards,
Alexander
Alex8 is offline   Reply With Quote
Old 03-21-2011, 08:09 AM   #5
nilshomer
Nils Homer
 
nilshomer's Avatar
 
Location: Boston, MA, USA

Join Date: Nov 2008
Posts: 1,285
Default

Quote:
Originally Posted by Alex8 View Post
Hello, Nils,
I have a problem obtaining color-space simulation reads.
The output BFAST looks OK:

@gi|12057207|gb|AE001439.1|_637443_636958_1_1_1:0:0_0:0:0_0
A21322003132201120203003022220220001033010212331013
+
11111111111111111111111111111111111111111111111111
...

But the two BWA files contain nucleotide reads:

@gi|12057207|gb|AE001439.1|_637444_636959_1_1_1:0:0_0:0:0_0/2
CTGGAATCTGGACCGAGATAATAGGGGAGGAAACATTACAGCGTTCACT
+
1111111111111111111111111111111111111111111111111
...

Is is intended? How to get BWA files in color-space?

Regards,
Alexander
This is intended. The BWA reads are "double-encoded" and the input to BWA as if you had used BWA's solid2fastq.pl.
nilshomer is offline   Reply With Quote
Old 03-21-2011, 08:19 AM   #6
Alex8
Member
 
Location: Europe

Join Date: Oct 2010
Posts: 10
Default

I wonder what is the easy way to convert double-encoded to csfasta? SOLiD denovo tools seems to contain similar function but is is not clearly available.
Alex8 is offline   Reply With Quote
Old 03-21-2011, 08:21 AM   #7
nilshomer
Nils Homer
 
nilshomer's Avatar
 
Location: Boston, MA, USA

Join Date: Nov 2008
Posts: 1,285
Default

Quote:
Originally Posted by Alex8 View Post
I wonder what is the easy way to convert double-encoded to csfasta? SOLiD denovo tools seems to contain similar function but is is not clearly available.
You should use the BFAST output to convert the CSFATQ to CSFASTA/QUAL, not the BWA. The outputs of dwgsim were designed for BFAST and BWA.
nilshomer is offline   Reply With Quote
Old 03-21-2011, 08:33 AM   #8
Alex8
Member
 
Location: Europe

Join Date: Oct 2010
Posts: 10
Default

Thank you for the information!
Alex8 is offline   Reply With Quote
Old 03-25-2011, 01:13 AM   #9
Alex8
Member
 
Location: Europe

Join Date: Oct 2010
Posts: 10
Default

Nils, please let know the format of the base/color error rate file - the one that goes with -E key.
Alex8 is offline   Reply With Quote
Old 03-25-2011, 02:12 PM   #10
nilshomer
Nils Homer
 
nilshomer's Avatar
 
Location: Boston, MA, USA

Join Date: Nov 2008
Posts: 1,285
Default

Quote:
Originally Posted by Alex8 View Post
Nils, please let know the format of the base/color error rate file - the one that goes with -E key.
In the 0.1.1 release, you should have one value per line, with the ith value representing the error rate of the ith base.

The latest GIT, which is what I would like to support, does not use an error file, but instead uses two command line options "-e/-E" giving either a uniform error rate (ex "-e 0.01") or a increasing error rate (ex from 0.01 to 0.1 is "-e 0.01-0.1").

The source code is your best documentation for this software.
nilshomer is offline   Reply With Quote
Old 07-05-2011, 03:34 AM   #11
arkal
advancing one byte at a time!
 
Location: Bangalore, India

Join Date: Jun 2011
Posts: 56
Default

Hey, I'm using dwgsim to generate paired end reads for my data. I need to generate a few single end read files as well is there any way i can use dwgsim to do the same? I don't want to use 2 different simulators for my studies.

-Arjun
arkal is offline   Reply With Quote
Old 07-05-2011, 05:30 AM   #12
nilshomer
Nils Homer
 
nilshomer's Avatar
 
Location: Boston, MA, USA

Join Date: Nov 2008
Posts: 1,285
Default

Sure, specify zero length reads for the second end ("-2 0").
nilshomer is offline   Reply With Quote
Old 07-05-2011, 05:35 AM   #13
arkal
advancing one byte at a time!
 
Location: Bangalore, India

Join Date: Jun 2011
Posts: 56
Default

Quote:
Originally Posted by nilshomer View Post
Sure, specify zero length reads for the second end ("-2 0").
Wanted to clarify that! Thanks a ton!

-A
arkal is offline   Reply With Quote
Old 07-11-2011, 11:03 PM   #14
arkal
advancing one byte at a time!
 
Location: Bangalore, India

Join Date: Jun 2011
Posts: 56
Default

Hey i just got another doubt regarding my single end problem... if i'm setting "-2 0" then do i double the value of -N since N is the No of Read Pairs?

-A
arkal is offline   Reply With Quote
Old 07-11-2011, 11:05 PM   #15
arkal
advancing one byte at a time!
 
Location: Bangalore, India

Join Date: Jun 2011
Posts: 56
Question

Quote:
Originally Posted by arkal View Post
Hey i just got another doubt regarding my single end problem... if i'm setting "-2 0" then do i double the value of -N since N is the No of Read Pairs?

-A
Just to clarify what i mean, supposing i need 1,000,000 read pairs for 15x coverage,
PE
-N 1000000 -1 76 -2 76

then is SE

-N 1000000 -1 76 -2 0

or

-N 2000000 -1 76 -2 0

?

Also, if I take file 1 of PE 30X is it equivalent to SE 15X?
-A

Last edited by arkal; 07-11-2011 at 11:12 PM.
arkal is offline   Reply With Quote
Old 07-12-2011, 06:31 AM   #16
nilshomer
Nils Homer
 
nilshomer's Avatar
 
Location: Boston, MA, USA

Join Date: Nov 2008
Posts: 1,285
Default

Take your read length, and multiply it by the number of bases to get the total bases present in your dataset. So for a 1M SE @ 50bp, you have 50Mb. For 1M PE @50bpx50bp, you have 100Mb. If you look at one PE file (reads1), then you get 50Mb. Note, that the bfast file will contain both PE in the same file, so that would be 100Mb.
nilshomer is offline   Reply With Quote
Old 07-12-2011, 06:51 AM   #17
arkal
advancing one byte at a time!
 
Location: Bangalore, India

Join Date: Jun 2011
Posts: 56
Question

Quote:
Originally Posted by nilshomer View Post
Take your read length, and multiply it by the number of bases to get the total bases present in your dataset. So for a 1M SE @ 50bp, you have 50Mb. For 1M PE @50bpx50bp, you have 100Mb. If you look at one PE file (reads1), then you get 50Mb. Note, that the bfast file will contain both PE in the same file, so that would be 100Mb.
I'm sorry im still a little confused...

The formula i'm using for N is

N = (Genome size x Coverage) / ( RL1 + RL2)

So if my Genome size is 100Mb, Coverage is 10 and RL1 = RL2 = 50 (PE)

N = 100,000,000 x 10 / 100 = 10,000,000 read pairs
i.e *_10X_PE_1.fq = *_10x_PE_2.fq = 10,000,000 reads.

Now, if RL2=0, keeping coverage and genome size the same,
N = 100,000,000 x 10 / 50 = 20,000,000 read pairs or reads
i.e *_10X_SE_.fq1 = 20,000,000 reads and *_10X_SE_2.fq = 0 reads.

I Hope i'm right till here.

Furthermore, if i have already generated 20X coverage PE for the same genome,
N = 100,000,000 x 20 / 100 = 20,000,000 read pairs
i.e *_20X_PE_1.fq = *_20X_PE_2.fq = 20,000,000 reads.

Is it safe to assume that
either *_20X_PE_1.fq OR *_20X_PE_2.fq can be used as a substitute for *_10X_SE_.fq1 as both have the same number of reads?
arkal is offline   Reply With Quote
Old 07-12-2011, 07:24 AM   #18
nilshomer
Nils Homer
 
nilshomer's Avatar
 
Location: Boston, MA, USA

Join Date: Nov 2008
Posts: 1,285
Default

The answer is yes.
nilshomer is offline   Reply With Quote
Old 07-12-2011, 08:59 AM   #19
arkal
advancing one byte at a time!
 
Location: Bangalore, India

Join Date: Jun 2011
Posts: 56
Default

Thanks a lot
arkal is offline   Reply With Quote
Reply

Tags
dnaa, short read simulation

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 05:25 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO