use of javafx.scene.chart.NumberAxis in project jvarkit by lindenb.
the class VariantQualChartFactory method build.
@Override
public Chart build() {
final NumberAxis xAxis = new NumberAxis();
xAxis.setLabel("QUAL");
final NumberAxis yAxis = new NumberAxis();
yAxis.setLabel("Count");
final XYChart.Series<Number, Number> serie = new XYChart.Series<Number, Number>();
serie.setName(xAxis.getLabel());
for (final Integer i : new TreeSet<>(this.qual2count.keySet())) {
serie.getData().add(new XYChart.Data<Number, Number>(i, this.qual2count.count(i)));
}
final LineChart<Number, Number> sbc = new LineChart<Number, Number>(xAxis, yAxis);
sbc.setTitle(this.getName());
sbc.getData().add(serie);
sbc.setCreateSymbols(false);
sbc.setLegendVisible(false);
return sbc;
}
use of javafx.scene.chart.NumberAxis in project jvarkit by lindenb.
the class AFByPopulationChartFactory method build.
@Override
public Chart build() {
final CategoryAxis xAxis = new CategoryAxis();
xAxis.setLabel("Population");
final NumberAxis yAxis = new NumberAxis();
yAxis.setLabel("Mean-MAF");
final XYChart.Series<String, Number> serie = new XYChart.Series<String, Number>();
serie.setName("Population");
for (int i = 0; i < this.popcount.size(); ++i) {
final PedFile.Status status = PedFile.Status.values()[i];
double v = 0;
if (this.popcount.get(i).num_maf > 0) {
v = this.popcount.get(i).sum / ((double) this.popcount.get(i).num_maf);
}
serie.getData().add(new XYChart.Data<String, Number>(status.name(), v));
}
final BarChart<String, Number> sbc = new BarChart<String, Number>(xAxis, yAxis);
sbc.setTitle(this.getName());
sbc.getData().add(serie);
sbc.setCategoryGap(0.2);
sbc.setLegendVisible(false);
return sbc;
}
use of javafx.scene.chart.NumberAxis in project jvarkit by lindenb.
the class AFBySexChartFactory method build.
@Override
public Chart build() {
final CategoryAxis xAxis = new CategoryAxis();
xAxis.setLabel("Sex");
final NumberAxis yAxis = new NumberAxis();
yAxis.setLabel("Mean-MAF");
final XYChart.Series<String, Number> serie = new XYChart.Series<String, Number>();
serie.setName("Sex");
for (int i = 0; i < this.popcount.size(); ++i) {
final PedFile.Sex sexxxxx = PedFile.Sex.values()[i];
double v = 0;
if (this.popcount.get(i).num_maf > 0) {
v = this.popcount.get(i).sum / ((double) this.popcount.get(i).num_maf);
}
serie.getData().add(new XYChart.Data<String, Number>(sexxxxx.name(), v));
}
final BarChart<String, Number> sbc = new BarChart<String, Number>(xAxis, yAxis);
sbc.setTitle(this.getName());
sbc.getData().add(serie);
sbc.setCategoryGap(0.2);
sbc.setLegendVisible(false);
return sbc;
}
use of javafx.scene.chart.NumberAxis in project jvarkit by lindenb.
the class AlleleFrequencyChartFactory method build.
@Override
public Chart build() {
final CategoryAxis xAxis = new CategoryAxis();
xAxis.setLabel("AF");
final NumberAxis yAxis = new NumberAxis();
yAxis.setLabel("Count");
final XYChart.Series<String, Number> serie = new XYChart.Series<String, Number>();
serie.setName(xAxis.getLabel());
for (final Limit limit : this.limits) {
if (this.afindexcount.count(limit.index) == 0L)
continue;
serie.getData().add(new XYChart.Data<String, Number>(limit.label, this.afindexcount.count(limit.index)));
}
final StackedBarChart<String, Number> sbc = new StackedBarChart<String, Number>(xAxis, yAxis);
sbc.setTitle("Allele Frequency" + (this.nSamples > 0 ? " (Nbr. Sample(s):" + this.nSamples + ")" : ""));
sbc.getData().add(serie);
sbc.setCategoryGap(0.2);
sbc.setLegendVisible(false);
return sbc;
}
use of javafx.scene.chart.NumberAxis in project jvarkit by lindenb.
the class GCPercentChartFactory method build.
@Override
public LineChart<Number, Number> build() {
final NumberAxis xAxis = new NumberAxis();
xAxis.setLabel("%GC");
final NumberAxis yAxis = new NumberAxis();
yAxis.setLabel("Count");
final XYChart.Series<Number, Number> serie = new XYChart.Series<Number, Number>();
serie.setName("QC");
for (int g = 0; g <= 100; ++g) {
serie.getData().add(new XYChart.Data<Number, Number>(g, this.gcPercent2count.count(g)));
}
final LineChart<Number, Number> sbc = new LineChart<Number, Number>(xAxis, yAxis);
sbc.setTitle("Percentage GC");
sbc.getData().add(serie);
sbc.setCreateSymbols(false);
sbc.setLegendVisible(false);
return sbc;
}
Aggregations