diff --git a/docs/Biostar145820.md b/docs/Biostar145820.md index 7fcf2d0a2..6e5b60140 100644 --- a/docs/Biostar145820.md +++ b/docs/Biostar145820.md @@ -11,7 +11,7 @@ subsample/shuffle BAM to fixed number of alignments. Usage: biostar145820 [options] Files Options: --bamcompression - Compression Level. + Compression Level. 0: no compression. 9: max compression; Default: 5 -f, --filter, --jexl A JEXL Expression that will be used to filter out some sam-records (see @@ -32,10 +32,17 @@ Usage: biostar145820 [options] Files Default: 50000 -o, --output Output file. Optional . Default: stdout + --reference, -R + For reading/writing CRAM files. Indexed fasta Reference file. This file + must be indexed with samtools faidx and with picard + CreateSequenceDictionary --samoutputformat Sam output format. Default: SAM Possible Values: [BAM, SAM, CRAM] + --seed + Random seed. -1 == current time + Default: -1 --tmpDir tmp working directory. Default: java.io.tmpDir Default: [] @@ -78,6 +85,11 @@ $ ./gradlew biostar145820 The java jar file will be installed in the `dist` directory. + +## Creation Date + +20150615 + ## Source code [https://github.com/lindenb/jvarkit/tree/master/src/main/java/com/github/lindenb/jvarkit/tools/biostar/Biostar145820.java](https://github.com/lindenb/jvarkit/tree/master/src/main/java/com/github/lindenb/jvarkit/tools/biostar/Biostar145820.java) @@ -102,7 +114,7 @@ Should you cite **biostar145820** ? [https://github.com/mr-c/shouldacite/blob/ma The current reference is: - * MED25 connects enhancer–promoter looping and MYC2-dependent activation of jasmonate signalling. Wang et al. Nature Plants 5, 616–625 (2019) https://doi.org/10.1038/s41477-019-0441-9 + * MED25 connects enhancer-promoter looping and MYC2-dependent activation of jasmonate signalling. Wang et al. Nature Plants 5, 616-625 (2019) https://doi.org/10.1038/s41477-019-0441-9 ## Example diff --git a/src/main/java/com/github/lindenb/jvarkit/tools/vcf2html/VcfToHtml.java b/src/main/java/com/github/lindenb/jvarkit/tools/vcf2html/VcfToHtml.java index 5c90bbdae..e8a656d5d 100644 --- a/src/main/java/com/github/lindenb/jvarkit/tools/vcf2html/VcfToHtml.java +++ b/src/main/java/com/github/lindenb/jvarkit/tools/vcf2html/VcfToHtml.java @@ -30,6 +30,7 @@ The MIT License (MIT) import java.nio.file.Path; import java.nio.file.Paths; import java.util.List; +import java.util.Optional; import java.util.stream.Collectors; import javax.xml.stream.XMLOutputFactory; @@ -84,6 +85,7 @@ public int doWork(final List args) { try(VCFReader reader = VCFReaderFactory.makeDefault().open(Paths.get(oneAndOnlyOneFile(args)),true)) { final VCFHeader header= reader.getHeader(); final SAMSequenceDictionary dict = SequenceDictionaryUtils.extractRequired(header); + final Optional buildName = SequenceDictionaryUtils.getBuildName(dict); try( ReferenceSequenceFile reference = ReferenceSequenceFileFactory.getReferenceSequenceFile(this.faidx)) { SequenceUtil.assertSequenceDictionariesEqual(SequenceDictionaryUtils.extractRequired(reference),dict); final List locs = IntervalListProvider.from(this.regionsStr).dictionary(dict).stream(). @@ -118,7 +120,7 @@ public int doWork(final List args) { jsw.name("contig").value(loc.getContig()); jsw.name("start").value(loc.getStart()); jsw.name("end").value(loc.getEnd()); - jsw.name("len").value(loc.getLengthOnReference()); + jsw.name("length").value(loc.getLengthOnReference()); jsw.name("sequence").value(reference.getSubsequenceAt(loc.getContig(), loc.getStart(), loc.getEnd()).getBaseString()); jsw.name("variants"); jsw.beginArray(); @@ -127,6 +129,7 @@ public int doWork(final List args) { jsw.name("start").value(ctx.getStart()); jsw.name("end").value(ctx.getEnd()); jsw.name("id").value(ctx.hasID()?ctx.getID():""); + jsw.name("type").value(ctx.getType().name()); jsw.name("ref").value(ctx.getReference().getDisplayString()); jsw.name("alts"); jsw.beginArray(); @@ -148,7 +151,7 @@ public int doWork(final List args) { final String filename = loc.getContig()+"_"+loc.getStart()+"_"+loc.getEnd()+".html"; - final String title= new SimpleInterval(loc).toNiceString(); + final String title= (buildName.isPresent()?buildName.get()+" ":"")+new SimpleInterval(loc).toNiceString(); OutputStream os = archive.openOuputStream(filename); XMLStreamWriter out = xof.createXMLStreamWriter(os, "UTF-8"); out.writeStartDocument("UTF-8", "1.0"); @@ -163,6 +166,9 @@ public int doWork(final List args) { "function repaint() {}" ); + out.writeEndElement();//script + out.writeStartElement("script"); + out.writeAttribute("src", "script.js"); out.writeEndElement();//script out.writeStartElement("title"); out.writeCharacters(title+" N="+StringUtils.niceInt(variants.size()));