Difference between revisions of "PacBio smrtpipe commandline"

From mn/bio/cees-bioinf
Jump to: navigation, search
Line 23: Line 23:
 
Actual filtering (NPROC is the number of CPUs the job gets):  
 
Actual filtering (NPROC is the number of CPUs the job gets):  
 
<pre>smrtpipe.py -D TMP=./ -D SHARED_DIR=./ -D NPROC=24 --params=desired_settings.xml xml:input.xml &amp;&gt; smrtpipe.err</pre>  
 
<pre>smrtpipe.py -D TMP=./ -D SHARED_DIR=./ -D NPROC=24 --params=desired_settings.xml xml:input.xml &amp;&gt; smrtpipe.err</pre>  
=== How to obtain the settings.xml file  ===
+
==== How to obtain the settings.xml file  ====
  
 
After a smrtportal upgrade, if it is not yet there in the folder /projects/nscdata/scripts/pacbio/smrtpipe_xml_files  
 
After a smrtportal upgrade, if it is not yet there in the folder /projects/nscdata/scripts/pacbio/smrtpipe_xml_files  
Line 36: Line 36:
  
 
Some applications require a reference sequence, e.g. mapping for SNP calling and detecting base modifications, or for running Quiver for assembly polishing. smrtanalysis needs a reference repository, which you can create with this command:  
 
Some applications require a reference sequence, e.g. mapping for SNP calling and detecting base modifications, or for running Quiver for assembly polishing. smrtanalysis needs a reference repository, which you can create with this command:  
<pre>referenceUploader -c -p destination_folder -n short_name -f path/to/reference.fasta</pre>
+
<pre>referenceUploader -c -p destination_folder -n short_name -f path/to/reference.fasta</pre>  
NOTES
+
NOTES  
  
*several references can be added to the same destination_folder
+
*several references can be added to the same destination_folder  
*pick a convenient short name
+
*pick a convenient short name  
*for large fasta files, this process make take some time, as an index file is built
+
*for large fasta files, this process make take some time, as an index file is built  
*when I do this, I get warnings about 'SLF4J', it seems these can be ignored  
+
*when I do this, I get warnings about 'SLF4J', it seems these can be ignored
*Using the reference repository
 
  
In the settings.xml file, there is a part saying:  
+
'''Using the reference repository'''
 +
 
 +
In the ''settings.xml'' file, there is a part saying:  
 
<pre>&lt;param name="reference" hidden="true"&gt;
 
<pre>&lt;param name="reference" hidden="true"&gt;
 
   &lt;value&gt;common/references/lambda&lt;/value&gt;
 
   &lt;value&gt;common/references/lambda&lt;/value&gt;
&lt;/param&gt;</pre>
+
&lt;/param&gt;</pre>  
 
Change the '''common/references/lambda''' part to the full path to the destination_folder<br>
 
Change the '''common/references/lambda''' part to the full path to the destination_folder<br>

Revision as of 10:32, 8 November 2013

HOW TO run smrtpipe.py on the command line.

smrtpipe.py is the PacBio pipeline for filtering and mapping PacBio runs, as well as running HGAP. For filtering-only jobs, it splits the raw reads on the adaptor and generates all subreads in fasta or fastq format.

Input:

  • input.fofn, list of files to process (see below)
  • bax.h5 files (or, before 2.0 software version, bas.h5 files) from the run (one per movie), raw-output from the PacBio
  • a settings.xml file, see below, specifies the job. See the end of this page for how to obtain such a xml file


Common steps

Set up environment

module load  smrtanalysis/x.y.z # at the time of writing, 'x.y.z' is 2.0.1

Generate smrtcells.fofn file

find path/to/runfile|grep bax.h5 >smrtcells.fofn #NOTE for pre 2,0 versions, use 'bas.h5'!

Convert this file to correct xml format:

fofnToSmrtpipeInput.py smrtcells.fofn >input.xml

copy a settings xml file, e.g. filter_only_settings.xml, HGAP_settings.xml, ...

rsync /projects/nscdata/scripts/pacbio/smrtpipe_xml_files/x.y.z/desired_settings.xml . 

NOTE won't work within a screen ..?

Actual filtering (NPROC is the number of CPUs the job gets):

smrtpipe.py -D TMP=./ -D SHARED_DIR=./ -D NPROC=24 --params=desired_settings.xml xml:input.xml &> smrtpipe.err

How to obtain the settings.xml file

After a smrtportal upgrade, if it is not yet there in the folder /projects/nscdata/scripts/pacbio/smrtpipe_xml_files

  • In SMRTportal on cod2, set up a job using the protocol you want to run, e.g. RS_Filter_Only, RS_HGAP_Assembly, you don't have to execute it
  • note down the job number
  • from the folder /projects/nscdata/smrtportal/userdata/jobs/016/, find the folder with your job number
  • copy the settings.xml file over to /projects/nscdata/scripts/pacbio/smrtpipe_xml_files/x.y.x/
  • give it a smart name (check the other folders), e.g. filter_only_settings.xml, HGAP_settings.xml

Working with a reference for mapping

Some applications require a reference sequence, e.g. mapping for SNP calling and detecting base modifications, or for running Quiver for assembly polishing. smrtanalysis needs a reference repository, which you can create with this command:

referenceUploader -c -p destination_folder -n short_name -f path/to/reference.fasta

NOTES

  • several references can be added to the same destination_folder
  • pick a convenient short name
  • for large fasta files, this process make take some time, as an index file is built
  • when I do this, I get warnings about 'SLF4J', it seems these can be ignored

Using the reference repository

In the settings.xml file, there is a part saying:

<param name="reference" hidden="true">
   <value>common/references/lambda</value>
</param>

Change the common/references/lambda part to the full path to the destination_folder