Biostar9608448

Convert long reads to short paired reads
Usage
This program is now part of the main jvarkit tool. See jvarkit for compiling.
Usage: java -jar dist/jvarkit.jar biostar9608448 [options] Files
Usage: biostar9608448 [options] Files
Options:
--bamcompression
Compression Level. 0: no compression. 9: max compression;
Default: 5
-h, --help
print help and exit
--helpFormat
What kind of help. One of [usage,markdown,xml].
-o, --out
Output file. Optional . Default: stdout
--read-length, -L
short read length
Default: 150
-R, --reference
Indexed fasta Reference file. This file must be indexed with samtools
faidx and with picard/gatk CreateSequenceDictionary or samtools dict
--regions
Limit analysis to this interval. A source of intervals. The following
suffixes are recognized: vcf, vcf.gz bed, bed.gz, gtf, gff, gff.gz,
gtf.gz.Otherwise it could be an empty string (no interval) or a list of
plain interval separated by '[ \t\n;,]'
--samoutputformat
Sam output format.
Default: SAM
Possible Values: [BAM, SAM, CRAM]
--validation-stringency
SAM Reader Validation Stringency
Default: LENIENT
Possible Values: [STRICT, LENIENT, SILENT]
--version
print version and exit
Keywords
- sam
- bam
- paired
- long
- illumina
- nanopore
See also in Biostars
Creation Date
20250130
Source code
Contribute
- Issue Tracker: http://github.com/lindenb/jvarkit/issues
- Source Code: http://github.com/lindenb/jvarkit
License
The project is licensed under the MIT license.
Citing
Should you cite biostar9608448 ? https://github.com/mr-c/shouldacite/blob/master/should-I-cite-this-software.md
The current reference is:
http://dx.doi.org/10.6084/m9.figshare.1425030
Lindenbaum, Pierre (2015): JVarkit: java-based utilities for Bioinformatics. figshare. http://dx.doi.org/10.6084/m9.figshare.1425030
Motivation:
convert single end long read to paired end reads.
Note that short single read, paired reads, unmapped read, secondary & supplementary alignements are discarded
Example:
$ java -jar dist/jvarkit.jar biostar9608448 src/test/resources/FAB23716.nanopore.bam -L 10 | samtools view | head
44767a9a-a0b9-4d7e-a324-d0d3ea113d8c_Basecall_Alignment_template 67 chr1 17123 38 6M2D4M = 31047 13925 GTGCGCCGCT -2.1.,(')- MC:Z:10M
44767a9a-a0b9-4d7e-a324-d0d3ea113d8c_Basecall_Alignment_template 147 chr1 31047 38 10M = 17123 -13925 CACCTTGAAC &#&$$$%$$% MC:Z:6M2D4M
d324a4bc-aa2c-4ee8-be69-934cc58c0003_Basecall_Alignment_template 67 chr1 38469 1 10M = 43735 5267 ATGCTGCCTG 2-,.314443 MC:Z:10M
d324a4bc-aa2c-4ee8-be69-934cc58c0003_Basecall_Alignment_template 147 chr1 43735 1 10M = 38469 -5267 AGCAAACTTT -',12()./. MC:Z:10M
76862e2e-98eb-4ad3-a523-6a8709c0b56a_Basecall_Alignment_template 67 chr1 44403 0 10M = 44481 79 TCAACAACAA &&&%&)'''& MC:Z:10M
76862e2e-98eb-4ad3-a523-6a8709c0b56a_Basecall_Alignment_template 147 chr1 44481 0 10M = 44403 -79 GGTAGCCGAA ''&$%(((%* MC:Z:10M
3330d9a6-d2a9-423b-accc-92a6d1fe646e_Basecall_Alignment_template 67 chr1 52105 1 8M2D2M = 53738 1634 ATTCCTACGA %).,.%+$)) MC:Z:10M
3330d9a6-d2a9-423b-accc-92a6d1fe646e_Basecall_Alignment_template 147 chr1 53738 1 10M = 52105 -1634 ACTTAGGCAA ,)((%%''(( MC:Z:8M2D2M
c6055e6a-9a1c-4126-84ec-64549fd4d264_Basecall_Alignment_template 67 chr1 63945 5 10M = 67887 3943 TCACCATGAT *+'*-.111- MC:Z:10M
c6055e6a-9a1c-4126-84ec-64549fd4d264_Basecall_Alignment_template 147 chr1 67887 5 10M = 63945 -3943 AGTATTATCA +$+*+/((*& MC:Z:10M