fastq2bcl package¶
Submodules¶
fastq2bcl.cli module¶
CLI for fastq2bcl app
[options.entry_points]
section in setup.cfg
:
console_scripts =
fastq2bcl = fastq2bcl.cli:run
Then run pip install .
(or pip install -e .
for editable mode)
which will install the command fastq2bcl
inside your current environment.
References
- fastq2bcl.cli.fastq2bcl(outdir, r1, r2=None, i1=None, i2=None, mask_string=None, exclude_umi=False, exclude_index=False, threads=1)[source]¶
fastq2bcl function call
- Parameters:
outdir – output directory to create run flowcell fake dir
r1 – R1 fastq.gz
r2 – R2 fastq.gz
i1 – I1 fastq.gz
i2 – I2 fastq.gz
Content of returned tuple:
rundir: final absolute path od created rundir run_id: generated mock run_id seq_fields: fields parsed and validated from first R1 record mask_string: mask used to generate RunInfo.xml
- Return type:
- fastq2bcl.cli.main(args)[source]¶
Wrapper allowing
fastq2bcl()
to be called with string arguments in a CLI fashionInstead of returning the value from
fastq2bcl()
, it prints the result to thestdout
in a nicely formatted message.- Parameters:
args (List[str]) – command line parameters as list of strings (for example
["--verbose", "42"]
).
- fastq2bcl.cli.parse_args(args)[source]¶
Parse command line parameters
- Parameters:
args (List[str]) – command line parameters as list of strings (for example
["--help"]
).- Returns:
command line parameters namespace
- Return type:
fastq2bcl.parser module¶
fastq2bcl.reader module¶
- fastq2bcl.reader.get_mask_from_files(r1, r2, i1, i2, exclude_umi, exclude_index)[source]¶
Build a mask string using seq length. In case of index and/or UMI in R1 sequence description, write this length to the Index mask
fastq2bcl.writer module¶
- fastq2bcl.writer.encode_cluster_byte(base, qual)[source]¶
Encode cluster byte. Bits 0-1 are the bases, respectively [A, C, G, T] for [0, 1, 2, 3]: bits 2-7 are shifted by two bits and contain the quality score. All bits 0 in a byte is reserved for no-call.
- fastq2bcl.writer.encode_loc_bytes(x_pos, y_pos)[source]¶
Encode x and y positon. FIXME this is not the correct formul according to the bcl2fastq source code.
- fastq2bcl.writer.generate_run_info_xml(run_id, run_number, flowcell_id, instrument, mask)[source]¶
Generate a valid Runinfo xml file.
- fastq2bcl.writer.init_bcl_and_write_cluster_counts(cycledir, cluster_count, filename='s_1_1101.bcl')[source]¶
Create bcl file and write cluster count
- fastq2bcl.writer.write_bcl_and_stats(cycle, cluster_count, outdir, sequences)[source]¶
Single process mode to write bcls
- fastq2bcl.writer.write_cycle(context, progress, task_id)[source]¶
Write a cycle file with a thread. with progress, task_id and exit event context: tuple with (cycle, cluster_count, outdir, data) data: tuple (base, quality) for a cluster
- fastq2bcl.writer.write_locs(outdir, positions)[source]¶
Write locations.
- Parameters:
Positions (List(tuple)) – is a List of tuple with x and y values