cut_up_fasta.py¶
Usage¶
The usage and help documentation of cut_up_fasta.py
can be seen by
running cut_up_fasta.py -h
:
usage: - [-h] [-c CHUNK_SIZE] [-o OVERLAP_SIZE] [-m] [-b BEDFILE]
contigs [contigs ...]
Cut up fasta file in non-overlapping or overlapping parts of equal length.
Optionally creates a BED-file where the cutup contigs are specified in terms
of the original contigs. This can be used as input to concoct_coverage_table.py.
positional arguments:
contigs Fasta files with contigs
optional arguments:
-h, --help show this help message and exit
-c CHUNK_SIZE, --chunk_size CHUNK_SIZE
Chunk size
-o OVERLAP_SIZE, --overlap_size OVERLAP_SIZE
Overlap size
-m, --merge_last Concatenate final part to last contig
-b BEDFILE, --bedfile BEDFILE
BEDfile to be created with exact regions of the
original contigs corresponding to the newly created
contigs
Example¶
An example of how to run cut_up_fasta.py
:
cut_up_fasta.py original_contigs.fa -c 10000 -o 0 --merge_last -b contigs_10K.bed > contigs_10K.fa
This creates a fasta file and a BED file.
The fasta file contigs_10K.fa
contains the original contigs cut up into parts of length exactly 10K, except for the last contig part which is between 10K and 20K long.
The BED file contigs_10K.bed
contains a list of the contig parts created with coordinates in the original contigs.