| 1 | <para> |
| 2 | We're going to use data published by Richard Lenski in his great paper |
| 3 | <emphasis>"Genome evolution and adaptation in a long-term experiment |
| 4 | with Escherichia coli"</emphasis>. This shows how MIRA finds all |
| 5 | mutations between two strains and how one would need just a few |
| 6 | minutes to know which genes are affected. |
| 7 | </para> |
| 8 | <note> |
| 9 | All steps described in this walkthrough are present in ready-to-be-run |
| 10 | scripts in the <literal>solexa3_lenski</literal> demo directory of the |
| 11 | MIRA package. |
| 12 | </note> |
| 13 | <note> |
| 14 | This walkthrough takes a few detours which are not really necessary, |
| 15 | but show how things can be done: it reduces the number of reads, it |
| 16 | creates a strain data file etc. Actually, the whole demo could be |
| 17 | reduced to two steps: downloading the data (naming it correctly) and |
| 18 | starting the assembly with a couple of parameters. |
| 19 | </note> |
| 20 | <sect3 id="sect_sxa_getting_the_data"> |
| 21 | <title> |
| 22 | Getting the data |
| 23 | </title> |
| 24 | <para> |
| 25 | We'll use the reference genome E.coli B REL606 to map one of the |
| 26 | strains from the paper. For mapping, I picked strain REL8593A more |
| 27 | or less at random. All the data needed is fortunately at the NCBI, |
| 28 | let's go and grab it: |
| 29 | </para> |
| 30 | <orderedlist> |
| 31 | <listitem> |
| 32 | <para> |
| 33 | the NCBI has REL606 named <emphasis>NC_012967</emphasis>. We'll |
| 34 | use the RefSeq version and the GenBank formatted file you can |
| 35 | download from |
| 36 | <ulink url="ftp://ftp.ncbi.nih.gov/genomes/Bacteria/Escherichia_coli_B_REL606/NC_012967.gbk"/> |
| 37 | </para> |
| 38 | </listitem> |
| 39 | <listitem> |
| 40 | <para> |
| 41 | the Solexa re-sequencing data you can get from <ulink |
| 42 | url="ftp://ftp.ncbi.nlm.nih.gov/sra/static/SRX012/SRX012992/"/>. Download |
| 43 | both FASTQ files, <filename>SRR030257_1.fastq.gz</filename> and |
| 44 | <filename>SRR030257_2.fastq.gz</filename>. |
| 45 | </para> |
| 46 | <para> |
| 47 | If you want more info regarding these data sets, have a look at |
| 48 | <ulink url="http://www.ncbi.nlm.nih.gov/sra/?db=sra&term=SRX012992&report=full"/> |
| 49 | </para> |
| 50 | </listitem> |
| 51 | </orderedlist> |
| 52 | </sect3> |
| 53 | <sect3 id="sect_sxa_preparing_the_data_for_an_assembly"> |
| 54 | <title> |
| 55 | Preparing the data for an assembly |
| 56 | </title> |
| 57 | <para> |
| 58 | In this section we will setup the directory structure for the |
| 59 | assembly and pre-process the data so that MIRA can start right away. |
| 60 | </para> |
| 61 | <para> |
| 62 | Let's start with setting up a directory structure. Remember: you can |
| 63 | setup the data almost any way you like, this is just how I do |
| 64 | things. |
| 65 | </para> |
| 66 | <para> |
| 67 | I normally create a project directory with three sub-directories: |
| 68 | <filename>origdata</filename>, <filename>data</filename>, and |
| 69 | <filename>assemblies</filename>. In <filename>origdata</filename> I |
| 70 | put the files exactly as I got them from the sequencing or data |
| 71 | provider, without touching them and even remowing write permissions |
| 72 | to these files so that they cannot be tampered with. After that, I |
| 73 | pre-process them and put the pre-processed files into |
| 74 | <filename>data</filename>. Pre-processing can be a lot of things, |
| 75 | starting from having to re-format the sequences, or renaming them, |
| 76 | perhaps also doing clips etc. Finally, I use these pre-processed |
| 77 | data in one or more assembly runs in the |
| 78 | <filename>assemblies</filename> directory, perhaps trying out |
| 79 | different assembly options. |
| 80 | </para> |
| 81 | <screen> |
| 82 | <prompt>arcadia:/some/path/$</prompt> <userinput>mkdir lenskitest</userinput> |
| 83 | <prompt>arcadia:/some/path/$</prompt> <userinput>cd lenskitest</userinput> |
| 84 | <prompt>arcadia:/some/path/lenskitest$</prompt> <userinput>mkdir data origdata assemblies</userinput> |
| 85 | <prompt>arcadia:/some/path/lenskitest$</prompt> <userinput>ls -l</userinput> |
| 86 | drwxr-xr-x 2 bach bach 4096 2009-12-06 16:06 assemblies |
| 87 | drwxr-xr-x 2 bach bach 4096 2009-12-06 16:06 data |
| 88 | drwxr-xr-x 2 bach bach 4096 2009-12-06 16:06 origdata</screen> |
| 89 | <para> |
| 90 | Now copy the files you just downloaded into the directory |
| 91 | <filename>origdata</filename>. |
| 92 | </para> |
| 93 | <screen> |
| 94 | <prompt>arcadia:/some/path/lenskitest$</prompt> <userinput>cp /wherever/the/files/are/SRR030257_1.fastq.gz origdata</userinput> |
| 95 | <prompt>arcadia:/some/path/lenskitest$</prompt> <userinput>cp /wherever/the/files/are/SRR030257_2.fastq.gz origdata</userinput> |
| 96 | <prompt>arcadia:/some/path/lenskitest$</prompt> <userinput>cp /wherever/the/files/are/NC_012967.gbk origdata</userinput> |
| 97 | <prompt>arcadia:/some/path/lenskitest$</prompt> <userinput>ls -l origdata</userinput> |
| 98 | -rw-r--r-- 1 bach bach 10543139 2009-12-06 16:38 NC_012967.gbk |
| 99 | -rw-r--r-- 1 bach bach 158807975 2009-12-06 15:15 SRR030257_1.fastq.gz |
| 100 | -rw-r--r-- 1 bach bach 157595587 2009-12-06 15:21 SRR030257_2.fastq.gz |
| 101 | </screen> |
| 102 | <para> |
| 103 | Great, let's preprocess the data. For this you must know a few things: |
| 104 | </para> |
| 105 | <itemizedlist> |
| 106 | <listitem> |
| 107 | <para> |
| 108 | the standard Illumina naming scheme for Solexa paired-end reads |
| 109 | is to append forward read names with <literal>/1</literal> and |
| 110 | reverse read names with <literal>/2</literal>. The reads are |
| 111 | normally put into at least two different files (one for forward, |
| 112 | one for reverse). Now, the Solexa data stored in the Short Read |
| 113 | Archive at the NCBI also has forward and reverse files for |
| 114 | paired-end Solexas. That's OK. What's a bit less good is that |
| 115 | the read names there DO NOT have /1 appended to names of forward |
| 116 | read, or /2 to names of reverse reads. The forward and reverse |
| 117 | reads in both files are just named exactly the same. We'll need |
| 118 | to fix that. |
| 119 | </para> |
| 120 | </listitem> |
| 121 | <listitem> |
| 122 | <para> |
| 123 | while Sanger and 454 reads should be preprocessed (clipping |
| 124 | sequencing vectors, perhaps quality clipping etc.), reads from |
| 125 | Solexa present do not. Some people perform quality clipping or |
| 126 | clipping of reads with too many 'N's in the sequence, but this |
| 127 | is not needed when using MIRA. In fact, MIRA will perform |
| 128 | everything needed for Solexa reads itself and will generally do |
| 129 | a much better job as the clipping performed is independent of |
| 130 | Solexa quality values (which are not always the most trustworthy |
| 131 | ones). |
| 132 | </para> |
| 133 | </listitem> |
| 134 | <listitem> |
| 135 | <para> |
| 136 | for a mapping assembly, it's good to give the strain name of the |
| 137 | backbone and the strain name for the reads mapped against. The |
| 138 | former can be done via command line, the later is done for each |
| 139 | read individually in a key-value file (the |
| 140 | <emphasis>straindata</emphasis> file). |
| 141 | </para> |
| 142 | </listitem> |
| 143 | </itemizedlist> |
| 144 | <para> |
| 145 | </para> |
| 146 | <para> |
| 147 | So, to pre-process the data, we will need to |
| 148 | </para> |
| 149 | <itemizedlist> |
| 150 | <listitem> |
| 151 | <para> |
| 152 | put the reads of the NCBI forward and reverse pairs into one |
| 153 | file |
| 154 | </para> |
| 155 | </listitem> |
| 156 | <listitem> |
| 157 | <para> |
| 158 | append <literal>/1</literal> to the names of forward reads, and |
| 159 | <literal>/2</literal> for reverse reads. |
| 160 | </para> |
| 161 | </listitem> |
| 162 | <listitem> |
| 163 | <para> |
| 164 | create a straindata file for MIRA |
| 165 | </para> |
| 166 | </listitem> |
| 167 | </itemizedlist> |
| 168 | <para> |
| 169 | </para> |
| 170 | <para> |
| 171 | To ease things for you, I've prepared a small script which will do |
| 172 | everything for you: copy and rename the reads as well as creating |
| 173 | strain names. Note that it's a small part of a more general script |
| 174 | which I use to sometimes sample subsets of large data sets, but for |
| 175 | the Lenski data set is small enough so that everything is taken. |
| 176 | </para> |
| 177 | <para> |
| 178 | Create a file <filename>prepdata.sh</filename> in directory |
| 179 | <filename>data</filename> and copy paste the following into it: |
| 180 | </para> |
| 181 | <screen> |
| 182 | ###################################################################### |
| 183 | ####### |
| 184 | ####### Prepare paired-end Solexa downloaded from NCBI |
| 185 | ####### |
| 186 | ###################################################################### |
| 187 | |
| 188 | # srrname: is the SRR name as downloaded form NCBI SRA |
| 189 | # numreads: maximum number of forward (and reverse) reads to take from |
| 190 | # each file. Just to avoid bacterial projects with a coverage |
| 191 | # of 200 or so. |
| 192 | # strainname: name of the strain which was re-sequenced |
| 193 | |
| 194 | srrname="SRR030257" |
| 195 | numreads=5000000 |
| 196 | strainname="REL8593A" |
| 197 | |
| 198 | ################################ |
| 199 | |
| 200 | numlines=$((4*${numreads})) |
| 201 | |
| 202 | # put "/1" Solexa reads into file |
| 203 | echo "Copying ${numreads} reads from _1 (forward reads)" |
| 204 | zcat ../origdata/${srrname}_1.fastq.gz | head -${numlines} | sed -e 's/SRR[0-9.]*/&\/1/' >${strainname}-${numreads}_in.solexa.fastq |
| 205 | |
| 206 | # put "/2" Solexa reads into file |
| 207 | echo "Copying ${numreads} reads from _2 (reverse reads)" |
| 208 | zcat ../origdata/${srrname}_2.fastq.gz | head -${numlines} | sed -e 's/SRR[0-9.]*/&\/2/' >>${strainname}-${numreads}_in.solexa.fastq |
| 209 | |
| 210 | # make file with strainnames |
| 211 | echo "Creating file with strain names for copied reads (this may take a while)." |
| 212 | grep "@SRR" ${strainname}-${numreads}_in.solexa.fastq | cut -f 1 -d ' ' | sed -e 's/@//' -e "s/$/ ${strainname}/" >>${strainname}-${numreads}_straindata_in.txt</screen> |
| 213 | <para> |
| 214 | Now, let's create the needed data: |
| 215 | </para> |
| 216 | <screen> |
| 217 | arcadia:/some/path/lenskitest$ <userinput>cd data</userinput> |
| 218 | arcadia:/some/path/lenskitest/data$ <userinput>ls -l</userinput> |
| 219 | -rw-r--r-- 1 bach bach 1349 2009-12-06 17:05 prepdata.sh |
| 220 | arcadia:/some/path/lenskitest/data$ <userinput>sh prepdata.sh</userinput> |
| 221 | Copying 5000000 reads from _1 (forward reads) |
| 222 | Copying 5000000 reads from _2 (reverse reads) |
| 223 | Creating file with strain names for copied reads (this may take a while). |
| 224 | arcadia:/some/path/lenskitest/data$ <userinput>ls -l</userinput> |
| 225 | -rw-r--r-- 1 bach bach 1349 2009-12-06 17:05 prepdata.sh |
| 226 | -rw-r--r-- 1 bach bach 1553532192 2009-12-06 15:36 REL8593A-5000000_in.solexa.fastq |
| 227 | -rw-r--r-- 1 bach bach 218188232 2009-12-06 15:36 REL8593A-5000000_straindata_in.txt</screen> |
| 228 | <para> |
| 229 | Last step, just for the sake of completeness, link in the GenBank formatted |
| 230 | file of the reference strain, giving it the same base name so that everything |
| 231 | is nicely set up for MIRA. |
| 232 | </para> |
| 233 | <screen> |
| 234 | <prompt>arcadia:/some/path/lenskitest/data$</prompt> <userinput>ln -s ../origdata/NC_012967.gbk REL8593A-5000000_backbone_in.gbf</userinput> |
| 235 | <prompt>arcadia:/some/path/lenskitest/data$</prompt> <userinput>ls -l</userinput> |
| 236 | -rw-r--r-- 1 bach bach 1349 2009-12-06 17:05 prepdata.sh |
| 237 | lrwxrwxrwx 1 bach bach 25 2009-12-06 16:39 REL8593A-5000000_backbone_in.gbf -> ../origdata/NC_012967.gbk |
| 238 | -rw-r--r-- 1 bach bach 1553532192 2009-12-06 15:36 REL8593A-5000000_in.solexa.fastq |
| 239 | -rw-r--r-- 1 bach bach 218188232 2009-12-06 15:36 REL8593A-5000000_straindata_in.txt |
| 240 | <prompt>arcadia:/some/path/lenskitest/data$</prompt> <userinput>cd ..</userinput> |
| 241 | <prompt>arcadia:/some/path/lenskitest$</prompt></screen> |
| 242 | <para> |
| 243 | Perfect, we're ready to start assemblies. |
| 244 | </para> |
| 245 | </sect3> |
| 246 | <sect3 id="sect_sxa_starting_the_mapping_assembly"> |
| 247 | <title> |
| 248 | Starting the mapping assembly |
| 249 | </title> |
| 250 | <screen> |
| 251 | <prompt>arcadia:/some/path/lenskitest$</prompt> <userinput>cd assemblies</userinput> |
| 252 | <prompt>arcadia:/some/path/lenskitest/assemblies$</prompt> <userinput>mkdir 1sttest</userinput> |
| 253 | <prompt>arcadia:/some/path/lenskitest/assemblies/1sttest$</prompt> <userinput>lndir ../../data</userinput> |
| 254 | <prompt>arcadia:/some/path/lenskitest/assemblies/1sttest$</prompt> <userinput>ls -l</userinput> |
| 255 | lrwxrwxrwx 1 bach bach 22 2009-12-06 17:18 prepdata.sh -> ../../data/prepdata.sh |
| 256 | lrwxrwxrwx 1 bach bach 43 2009-12-06 16:40 REL8593A-5000000_backbone_in.gbf -> ../../data/REL8593A-5000000_backbone_in.gbf |
| 257 | lrwxrwxrwx 1 bach bach 43 2009-12-06 15:39 REL8593A-5000000_in.solexa.fastq -> ../../data/REL8593A-5000000_in.solexa.fastq |
| 258 | lrwxrwxrwx 1 bach bach 45 2009-12-06 15:39 REL8593A-5000000_straindata_in.txt -> ../../data/REL8593A-5000000_straindata_in.txt</screen> |
| 259 | <para> |
| 260 | Oooops, we don't need the link <filename>prepdata.sh</filename> |
| 261 | here, just delete it. |
| 262 | </para> |
| 263 | <screen> |
| 264 | <prompt>arcadia:/some/path/lenskitest/assemblies/1sttest$</prompt> <userinput>rm prepdata.sh</userinput></screen> |
| 265 | <para> |
| 266 | Perfect. Now then, start a simple mapping assembly: |
| 267 | </para> |
| 268 | <screen> |
| 269 | <prompt>arcadia:/some/path/lenskitest/assemblies/1sttest$</prompt> <userinput>mira |
| 270 | --fastq |
| 271 | --project=REL8593A-5000000 |
| 272 | --job=mapping,genome,accurate,solexa |
| 273 | -SB:lsd=yes:bsn=ECO_B_REL606:bft=gbf |
| 274 | >&log_assembly.txt</userinput></screen> |
| 275 | <note> |
| 276 | <title>Note 1</title> |
| 277 | <para> |
| 278 | The above command has been split in multiple lines for better |
| 279 | overview but should be entered in one line. It basically says: |
| 280 | load all data in FASTQ format; the project name is |
| 281 | <emphasis>REL8593A-5000000</emphasis> (and therefore all input and |
| 282 | output files will have this prefix by default if not chosen |
| 283 | otherwise); we want an accurate mapping of Solexa reads against a |
| 284 | genome; load strain data of a separate strain file |
| 285 | (<arg>-SB:lsd=yes</arg>); the strain name of the reference |
| 286 | sequence is 'ECO_B_REL606' (<arg>-SB:bsn=ECO_B_REL606</arg>) and |
| 287 | the file type containing the reference sequence in a GenBank |
| 288 | format (<arg>-SB:bft=gbf</arg>). Last but not least, redirect the |
| 289 | progress output of the assembler to a file named |
| 290 | <filename>log_assembly.txt</filename>. |
| 291 | </para> |
| 292 | </note> |
| 293 | <note> |
| 294 | <title>Note 2</title> |
| 295 | <para> |
| 296 | The above assembly takes approximately 35 minutes on my computer |
| 297 | (i7 940 with 12 GB RAM) when using 4 threads (I have '-GE:not=4' |
| 298 | additionally). It may be faster or slower on your computer. |
| 299 | </para> |
| 300 | </note> |
| 301 | <note> |
| 302 | <title>Note 3</title> |
| 303 | <para> |
| 304 | You will need some 10.5 GB RAM to get through this. You might get |
| 305 | away with a bit less RAM and using swap, but less than 8 GB RAM is |
| 306 | not recommended. |
| 307 | </para> |
| 308 | </note> |
| 309 | <para> |
| 310 | Let's have a look at the directory now: |
| 311 | </para> |
| 312 | <screen> |
| 313 | <prompt>arcadia:/some/path/lenskitest/assemblies/1sttest$</prompt> <userinput>ls -l</userinput> |
| 314 | -rw-r--r-- 1 bach bach 1463331186 2010-01-27 20:41 log_assembly.txt |
| 315 | drwxr-xr-x 6 bach bach 4096 2010-01-27 20:04 REL8593A-5000000_assembly |
| 316 | lrwxrwxrwx 1 bach bach 43 2009-12-06 16:40 REL8593A-5000000_backbone_in.gbf -> ../../data/REL8593A-5000000_backbone_in.gbf |
| 317 | lrwxrwxrwx 1 bach bach 43 2009-12-06 15:39 REL8593A-5000000_in.solexa.fastq -> ../../data/REL8593A-5000000_in.solexa.fastq |
| 318 | lrwxrwxrwx 1 bach bach 45 2009-12-06 15:39 REL8593A-5000000_straindata_in.txt -> ../../data/REL8593A-5000000_straindata_in.txt</screen> |
| 319 | <para> |
| 320 | Not much which changed. All files created by MIRA will be in the |
| 321 | REL8593A-5000000_assembly directory. Going one level down, you'll see 4 |
| 322 | sub-directories: |
| 323 | </para> |
| 324 | <screen> |
| 325 | <prompt>arcadia:/some/path/lenskitest/assemblies/1sttest$</prompt> <userinput>cd REL8593A-5000000_assembly</userinput> |
| 326 | <prompt>arcadia:.../1sttest/REL8593A-5000000_assembly$</prompt> <userinput>ls -l</userinput> |
| 327 | drwxr-xr-x 2 bach bach 4096 2010-01-27 20:29 REL8593A-5000000_d_chkpt |
| 328 | drwxr-xr-x 2 bach bach 4096 2010-01-27 20:40 REL8593A-5000000_d_info |
| 329 | drwxr-xr-x 2 bach bach 4096 2010-01-27 20:30 REL8593A-5000000_d_tmp |
| 330 | drwxr-xr-x 2 bach bach 4096 2010-01-27 21:19 REL8593A-5000000_d_results</screen> |
| 331 | <para> |
| 332 | You can safely delete the tmp and the chkpt directories, in this |
| 333 | walkthrough they are not needed anymore. |
| 334 | </para> |
| 335 | </sect3> |
| 336 | <sect3 id="sect_sxa_looking_at_results"> |
| 337 | <title> |
| 338 | Looking at results |
| 339 | </title> |
| 340 | <para> |
| 341 | Results will be in a sub-directories created by MIRA. Let's go there |
| 342 | and have a look. |
| 343 | </para> |
| 344 | <screen> |
| 345 | <prompt>arcadia:/some/path/lenskitest/assemblies/1sttest$</prompt> <userinput>cd REL8593A-5000000_assembly</userinput> |
| 346 | <prompt>arcadia:.../1sttest/REL8593A-5000000_assembly$</prompt> <userinput>cd REL8593A-5000000_d_results</userinput> |
| 347 | <prompt>arcadia:.../REL8593A-5000000_d_results$</prompt> <userinput>ls -l</userinput> |
| 348 | -rw-r--r-- 1 bach bach 455087340 2010-01-27 20:40 REL8593A-5000000_out.ace |
| 349 | -rw-r--r-- 1 bach bach 972479972 2010-01-27 20:38 REL8593A-5000000_out.caf |
| 350 | -rw-r--r-- 1 bach bach 569619434 2010-01-27 20:38 REL8593A-5000000_out.maf |
| 351 | -rw-r--r-- 1 bach bach 4708371 2010-01-27 20:39 REL8593A-5000000_out.padded.fasta |
| 352 | -rw-r--r-- 1 bach bach 14125036 2010-01-27 20:39 REL8593A-5000000_out.padded.fasta.qual |
| 353 | -rw-r--r-- 1 bach bach 472618709 2010-01-27 20:39 REL8593A-5000000_out.tcs |
| 354 | -rw-r--r-- 1 bach bach 4707025 2010-01-27 20:39 REL8593A-5000000_out.unpadded.fasta |
| 355 | -rw-r--r-- 1 bach bach 14120999 2010-01-27 20:39 REL8593A-5000000_out.unpadded.fasta.qual |
| 356 | -rw-r--r-- 1 bach bach 13862715 2010-01-27 20:39 REL8593A-5000000_out.wig</screen> |
| 357 | <para> |
| 358 | You can see that MIRA has created output in many different formats |
| 359 | suited for a number of different applications. Most commonly known |
| 360 | will be ACE and CAF for their use in finishing programs (e.g. gap4 |
| 361 | and consed). |
| 362 | </para> |
| 363 | <para> |
| 364 | In a different directory (the info directory) there are also files |
| 365 | containing all sorts of statistics and useful information. |
| 366 | </para> |
| 367 | <screen> |
| 368 | <prompt>arcadia:.../REL8593A-5000000_d_results$</prompt> <userinput>cd ../REL8593A-5000000_d_info/</userinput> |
| 369 | <prompt>arcadia:.../REL8593A-5000000_d_info$</prompt> <userinput>ls -l</userinput> |
| 370 | -rw-r--r-- 1 bach bach 2256 2010-01-27 20:40 REL8593A-5000000_info_assembly.txt |
| 371 | -rw-r--r-- 1 bach bach 124 2010-01-27 20:04 REL8593A-5000000_info_callparameters.txt |
| 372 | -rw-r--r-- 1 bach bach 37513 2010-01-27 20:37 REL8593A-5000000_info_consensustaglist.txt |
| 373 | -rw-r--r-- 1 bach bach 28522692 2010-01-27 20:37 REL8593A-5000000_info_contigreadlist.txt |
| 374 | -rw-r--r-- 1 bach bach 176 2010-01-27 20:37 REL8593A-5000000_info_contigstats.txt |
| 375 | -rw-r--r-- 1 bach bach 15359354 2010-01-27 20:40 REL8593A-5000000_info_debrislist.txt |
| 376 | -rw-r--r-- 1 bach bach 45802751 2010-01-27 20:37 REL8593A-5000000_info_readtaglist.txt</screen> |
| 377 | <para> |
| 378 | Just have a look at them to get a feeling what they show. You'll |
| 379 | find more information regarding these files in that main manual of |
| 380 | MIRA. At the moment, let's just have a quick assessment of the |
| 381 | differences between the Lenski reference strain and the REL8593A |
| 382 | train by counting how many SNPs MIRA thinks there are (marked with |
| 383 | <emphasis>SROc</emphasis> tags in the consensus): |
| 384 | </para> |
| 385 | <screen> |
| 386 | <prompt>arcadia:.../REL8593A-5000000_d_info$</prompt> <userinput>grep -c SROc REL8593A-5000000_info_consensustaglist.txt</userinput> |
| 387 | 102</screen> |
| 388 | <para> |
| 389 | </para> |
| 390 | <para> |
| 391 | 102 bases are marked with such a tag. You will later see that this |
| 392 | is an overestimation due to several insert sites and deletions, but |
| 393 | it's a good first approximation. |
| 394 | </para> |
| 395 | <para> |
| 396 | Let's count how many potential deletion sites REL8593A has in |
| 397 | comparison to the reference strain: |
| 398 | </para> |
| 399 | <screen> |
| 400 | <prompt>arcadia:.../REL8593A-5000000_d_info$</prompt> <userinput>grep -c MCVc REL8593A-5000000_info_consensustaglist.txt</userinput> |
| 401 | 48</screen> |
| 402 | <para> |
| 403 | This number too is a slight overestimation due to |
| 404 | cross-contamination with sequenced strain which did not have these |
| 405 | deletions, but it's also a first approximate. |
| 406 | </para> |
| 407 | </sect3> |
| 408 | <sect3 id="sect_sxa_postprocessing_with_gap4_and_reexporting_to_mira"> |
| 409 | <title> |
| 410 | Post-processing with gap4 and re-exporting to MIRA |
| 411 | </title> |
| 412 | <para> |
| 413 | To have a look at your project in gap4, use the caf2gap program (you |
| 414 | can get it at the Sanger Centre), and then gap4: |
| 415 | </para> |
| 416 | <screen> |
| 417 | <prompt>arcadia:.../REL8593A-5000000_d_results$</prompt> <userinput>ls -l</userinput> |
| 418 | -rw-r--r-- 1 bach bach 455087340 2010-01-27 20:40 REL8593A-5000000_out.ace |
| 419 | -rw-r--r-- 1 bach bach 972479972 2010-01-27 20:38 REL8593A-5000000_out.caf |
| 420 | -rw-r--r-- 1 bach bach 569619434 2010-01-27 20:38 REL8593A-5000000_out.maf |
| 421 | -rw-r--r-- 1 bach bach 4708371 2010-01-27 20:39 REL8593A-5000000_out.padded.fasta |
| 422 | -rw-r--r-- 1 bach bach 14125036 2010-01-27 20:39 REL8593A-5000000_out.padded.fasta.qual |
| 423 | -rw-r--r-- 1 bach bach 472618709 2010-01-27 20:39 REL8593A-5000000_out.tcs |
| 424 | -rw-r--r-- 1 bach bach 4707025 2010-01-27 20:39 REL8593A-5000000_out.unpadded.fasta |
| 425 | -rw-r--r-- 1 bach bach 14120999 2010-01-27 20:39 REL8593A-5000000_out.unpadded.fasta.qual |
| 426 | -rw-r--r-- 1 bach bach 13862715 2010-01-27 20:39 REL8593A-5000000_out.wig |
| 427 | <prompt>arcadia:.../REL8593A-5000000_d_results$</prompt> <userinput>caf2gap -project REL8593A -ace REL8593A-5000000_out.caf >&/dev/null</userinput> |
| 428 | <prompt>arcadia:.../REL8593A-5000000_d_results$</prompt> <userinput>ls -l</userinput> |
| 429 | -rw-r--r-- 1 bach bach 1233494048 2010-01-27 20:43 REL8593A.0 |
| 430 | -rw-r--r-- 1 bach bach 233589448 2010-01-27 20:43 REL8593A.0.aux |
| 431 | -rw-r--r-- 1 bach bach 455087340 2010-01-27 20:40 REL8593A-5000000_out.ace |
| 432 | -rw-r--r-- 1 bach bach 972479972 2010-01-27 20:38 REL8593A-5000000_out.caf |
| 433 | -rw-r--r-- 1 bach bach 569619434 2010-01-27 20:38 REL8593A-5000000_out.maf |
| 434 | -rw-r--r-- 1 bach bach 4708371 2010-01-27 20:39 REL8593A-5000000_out.padded.fasta |
| 435 | -rw-r--r-- 1 bach bach 14125036 2010-01-27 20:39 REL8593A-5000000_out.padded.fasta.qual |
| 436 | -rw-r--r-- 1 bach bach 472618709 2010-01-27 20:39 REL8593A-5000000_out.tcs |
| 437 | -rw-r--r-- 1 bach bach 4707025 2010-01-27 20:39 REL8593A-5000000_out.unpadded.fasta |
| 438 | -rw-r--r-- 1 bach bach 14120999 2010-01-27 20:39 REL8593A-5000000_out.unpadded.fasta.qual |
| 439 | -rw-r--r-- 1 bach bach 13862715 2010-01-27 20:39 REL8593A-5000000_out.wig |
| 440 | |
| 441 | <prompt>arcadia:.../REL8593A-5000000_d_results$</prompt> <userinput>gap4 REL8593A.0</userinput></screen> |
| 442 | <para> |
| 443 | Search for the tags set by MIRA which denoted features or problems (SROc, |
| 444 | WRMc, MCVc, UNSc, IUPc. See main manual for full list) in the assembly, and |
| 445 | edit accordingly. Save your gap4 database as a new version (e.g. REL8593A.1), |
| 446 | then exit gap4. |
| 447 | </para> |
| 448 | <para> |
| 449 | Then use the gap2caf command (also from the Sanger Centre) to convert |
| 450 | the gap4 database back to CAF. |
| 451 | </para> |
| 452 | <screen> |
| 453 | <prompt>arcadia:.../REL8593A-5000000_d_results$</prompt> <userinput>gap2caf -project REL8593A.1 >rel8593a_edited.caf</userinput></screen> |
| 454 | <para> |
| 455 | As gap4 jumbled the consensus (it does not know different sequencing |
| 456 | technologies), having convert_project recalculate the consensus |
| 457 | (with the "<literal>-r c</literal>" option) is generally a good |
| 458 | idea. |
| 459 | </para> |
| 460 | <screen> |
| 461 | <prompt>arcadia:.../REL8593A-5000000_d_results$</prompt> <userinput>convert_project -f caf -t caf -r c rel8593a_edited.caf rel8593a_edited_recalled</userinput></screen> |
| 462 | </sect3> |
| 463 | <sect3 id="sect_sxa_converting_mapping_results_into_html_and_simple_spreadsheet_tables_for_biologists"> |
| 464 | <title> |
| 465 | Converting mapping results into HTML and simple spreadsheet tables |
| 466 | for biologists |
| 467 | </title> |
| 468 | <para> |
| 469 | You will have to use either CAF or MAF as input, either of which can |
| 470 | be the direct result from the MIRA assembly or an already cleaned |
| 471 | and edited file. For the sake of simplicity, we'll use the file |
| 472 | created by MIRA in the steps above. |
| 473 | </para> |
| 474 | <para> |
| 475 | Let's start with a HTML file showing all positions of interest: |
| 476 | </para> |
| 477 | <screen> |
| 478 | <prompt>arcadia:.../REL8593A-5000000_d_results$</prompt> <userinput>convert_project -f caf -t hsnp REL8593A-5000000_out.caf rel8593a</userinput> |
| 479 | <prompt>arcadia:.../REL8593A-5000000_d_results$</prompt> <userinput>ls -l *html</userinput> |
| 480 | -rw-r--r-- 1 bach bach 5198791 2010-01-27 20:49 rel8593a_info_snpenvironment.html</screen> |
| 481 | <para> |
| 482 | But MIRA can do even better: create tables ready to be imported in spreadsheet |
| 483 | programs. |
| 484 | </para> |
| 485 | <screen> |
| 486 | <prompt>arcadia:.../REL8593A-5000000_d_results$</prompt> <userinput>convert_project -f caf -t asnp REL8593A-5000000_out.caf rel8593a</userinput> |
| 487 | <prompt>arcadia:.../REL8593A-5000000_d_results$</prompt> <userinput>ls -l rel8593a*</userinput> |
| 488 | -rw-r--r-- 1 bach bach 25864 2010-01-27 20:48 rel8593a_info_featureanalysis.txt |
| 489 | -rw-r--r-- 1 bach bach 12402905 2010-01-27 20:48 rel8593a_info_featuresequences.txt |
| 490 | -rw-r--r-- 1 bach bach 954473 2010-01-27 20:48 rel8593a_info_featuresummary.txt |
| 491 | -rw-r--r-- 1 bach bach 5198791 2010-01-27 20:49 rel8593a_info_snpenvironment.html |
| 492 | -rw-r--r-- 1 bach bach 13810 2010-01-27 20:47 rel8593a_info_snplist.txt</screen> |
| 493 | <para> |
| 494 | Have a look at all file, perhaps starting with the SNP list, then the feature |
| 495 | analysis, then the feature summary (your biologists will love that one, |
| 496 | especially when combined with filters in the spreadsheet program) and |
| 497 | then the feature sequences. |
| 498 | </para> |
| 499 | </sect3> |