Skip to content

Commit

Permalink
updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ploy-np committed Oct 24, 2020
1 parent befd662 commit 8ff79fe
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 10 deletions.
9 changes: 8 additions & 1 deletion docs/source/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,17 @@ The format of configuration file which is one of the inputs for ``xpore-diffmod`

out: <DIR_PATH_FOR_OUTPUTS>
(OPTIONAL)
criteria:
readcount_min: <15>
readcount_max: <1000>
method:
prefiltering:
method: t-test
threshold: <P_VALUE_THRESHOLD>
max_iters: <500>
stopping_criterial: <0.0001>



2 changes: 2 additions & 0 deletions docs/source/preparation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ Data preparation from raw reads
guppy_basecaller -i </PATH/TO/FAST5> -s </PATH/TO/FASTQ> --flowcell <FLOWCELL_ID> --kit <KIT_ID> --device auto -q 0 -r

2. Align to transcriptome::
minimap2 -ax map-ont -uf -t 3 --secondary=no <MMI> <PATH/TO/FASTQ.GZ> > <PATH/TO/SAM> 2>> <PATH/TO/SAM_LOG>
samtools view -Sb <PATH/TO/SAM> | samtools sort -o <PATH/TO/BAM> - &>> <PATH/TO/BAM_LOG>
samtools index <PATH/TO/BAM> &>> <PATH/TO/BAM_INDEX_LOG>

3. Resquiggle using `nanopolish eventalign <https://nanopolish.readthedocs.io/en/latest/quickstart_eventalign.html>`_::
nanopolish index -d <PATH/TO/FAST5_DIR> <PATH/TO/FASTQ_FILE>
nanopolish eventalign --reads <PATH/TO/FASTQ_FILE> \
--bam <PATH/TO/BAM_FILE> \
Expand Down
39 changes: 36 additions & 3 deletions docs/source/scripts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,47 @@ We provide 2 main scripts to run the analysis of differential RNA modifications

1. ``xpore-dataprep``

Input
-------

Usage example
--------------

================= ========== =============== =============
Argument name(s) Required Default value Description
================= ========== =============== =============
--eventalign Yes NA eventalign filepath, the output from nanopolish.
--summary Yes NA eventalign summary filepath, the output from nanopolish.
--out_dir Yes NA output directory.
--eventalign=FILE Yes NA Eventalign filepath, the output from nanopolish.
--summary=FILE Yes NA Eventalign summary filepath, the output from nanopolish.
--out_dir=DIR Yes NA Output directory.
--ensembl=NUM No 91 Ensembl version for gene-transcript mapping.
--species=STR No homo_sapiens Species for ensembl gene-transcript mapping.
--genome No False To run on Genomic coordinates. Without this argument, the program will run on transcriptomic coordinates.
--n_processes=NUM No 1 Number of processes to run.
--readcount_max=NUM No 1000 Maximum read counts per gene.
--resume No False With this argument, the program will resume from the previous run.
================= ========== =============== =============

Output
--------

2. ``xpore-diffmod``

Input
--------

Usage example
--------------

================= ========== =============== =============
Argument name(s) Required Default value Description
================= ========== =============== =============
--config=FILE Yes NA Yaml configuraion filepath.
--n_processes=NUM No 1 Number of processes to run.
--save_models No False With this argument, the program will save the model parameters for each id.
--resume No False With this argument, the program will resume from the previous run.
--ids=LIST No [] Gene / Transcript ids to model.
================= ========== =============== =============

Output
--------

5 changes: 2 additions & 3 deletions xpore/scripts/dataprep.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,14 @@ def get_args():
required.add_argument('--summary', dest='summary', help='eventalign summary filepath, the output from nanopolish.',required=True)
required.add_argument('--out_dir', dest='out_dir', help='output directory.',required=True)

# Optional
required.add_argument('--ensembl', dest='ensembl', help='ensembl version for gene-transcript mapping.',type=int, default=91)
required.add_argument('--species', dest='species', help='species for ensembl gene-transcript mapping.', default='homo_sapiens')

# Optional
# parser.add_argument('--features', dest='features', help='Signal features to extract.',type=list,default=['norm_mean'])
optional.add_argument('--genome', dest='genome', help='to run on Genomic coordinates. Without this argument, the program will run on transcriptomic coordinates',default=False,action='store_true')
optional.add_argument('--n_processes', dest='n_processes', help='number of processes to run.',type=int, default=1)
optional.add_argument('--readcount_max', dest='readcount_max', help='maximum read counts per gene.',type=int, default=1000)
optional.add_argument('--resume', dest='resume', help='resume from the previous run.',default=False,action='store_true') #todo
optional.add_argument('--resume', dest='resume', help='with this argument, the program will resume from the previous run.',default=False,action='store_true') #todo

parser._action_groups.append(optional)
return parser.parse_args()
Expand Down
6 changes: 3 additions & 3 deletions xpore/scripts/diffmod.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ def get_args():

# Optional arguments
optional.add_argument('--n_processes', dest='n_processes', help='number of processes to run.',type=int,default=1)
optional.add_argument('--save_models', dest='save_models', help='save the models.',default=False,action='store_true') # todo
optional.add_argument('--resume', dest='resume', help='resume from the previous run.',default=False,action='store_true')
optional.add_argument('--save_models', dest='save_models', help='with this argument, the program will save the model parameters for each id.',default=False,action='store_true') # todo
optional.add_argument('--resume', dest='resume', help='with this argument, the program will resume from the previous run.',default=False,action='store_true')

optional.add_argument('--ids', dest='ids', help='gene ids or transcript ids.',default=[],nargs='*')
optional.add_argument('--ids', dest='ids', help='gene / transcript ids to model.',default=[],nargs='*')

parser._action_groups.append(optional)
return parser.parse_args()
Expand Down

0 comments on commit 8ff79fe

Please sign in to comment.