Skip to content

Commit e5d25da

Browse files
committed
Added documentaiton for CRAM usage
1 parent 8331bfa commit e5d25da

2 files changed

Lines changed: 53 additions & 0 deletions

File tree

tests/README

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
Command to make test files for umi_tools extract --either-read testing:
22

33
cd tests; paste <(zcat indrop.fastq.1.gz) <(zcat indrop.fastq.2.gz)|paste - - - - - - - -| awk -F "\t" 'BEGIN{OFS="\n"; srand(0)} {if(rand()>0.5) {print $1,$3,$5,$7 > "delete_me"; print $2,$4,$6,$8 > "delete_me2"} else {print $2,$4,$6,$8 > "delete_me"; print $1,$3,$5,$7 > "delete_me2"}}'; gzip delete_me2 -c > indrop.fastq.2_either_read.gz; gzip delete_me -c > indrop.fastq.1_either_read.gz; rm delete_me delete_me2
4+
5+
6+
Note that CRAM outputs are tested at the string decoded level using pysam, and not at the binary level. This avoids differences due to differenly installed compression libraries.
7+

umi_tools/Documentation.py

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,55 @@
420420
Input/Output Options
421421
---------------------
422422
423+
The following options deal with input and output format, and are useful for
424+
outputting CRAM format. In general UMI-tools will attempt to guess the input
425+
and output formats from the file names, but thing can be over-written using
426+
the ``out-format`` and ``input-format`` options. The location of CRAM
427+
reference files will be taken from the either the an input CRAM file
428+
(if present) or from the ``--reference-filename`` option. Otherwise
429+
the reference will be embedded in the file.
430+
431+
"""""""""""""""""""""""""
432+
``--in-format=IN_FORMAT``
433+
"""""""""""""""""""""""""
434+
File format of the input file. Format is usually
435+
implied from the extension of the filename, but maybe
436+
overridden with this option. Default=bam
437+
438+
"""""""""""""""""""""""""""
439+
``--out-format=OUT_FORMAT``
440+
"""""""""""""""""""""""""""
441+
File format of the input file. Format is usually
442+
implied from the extension of the filename, but maybe
443+
overridden with this option. Default=bam
444+
445+
"""""""""""""""""""""""""""""""""
446+
``--input-options=INPUT_OPTIONS``
447+
"""""""""""""""""""""""""""""""""
448+
449+
Format string provided to htslib for reading. Mostly
450+
useful for CRAM formatted files. See samtools
451+
documentation
452+
453+
"""""""""""""""""""""""""""""""""""
454+
``--output-options=OUTPUT_OPTIONS``
455+
"""""""""""""""""""""""""""""""""""
456+
Format string provided to htslib for writing. Mostly
457+
useful for CRAM formatted files. See samtools
458+
documentation
459+
460+
"""""""""""""""""""""""""""""""""""""""""""
461+
``--reference-filename=REFERENCE_FILENAME``
462+
"""""""""""""""""""""""""""""""""""""""""""
463+
File path or URL to the genome reference to be used
464+
when reading or writing CRAM files. Can be a path or
465+
a URL. By default, when reading a CRAM file, the
466+
reference recorded in the input file will be used
467+
unless this is specified. URL references cannot be read
468+
from input files, however. When writing, specifying a
469+
reference location is required unless specified in input.
470+
471+
423472
"""""""""""""""""""""""
424473
``--in-sam, --out-sam``
425474
"""""""""""""""""""""""

0 commit comments

Comments
 (0)