All Downloads are FREE. Search and download functionalities are using the official Maven repository.

picard.illumina.parser.fakers.MultiTileLocsFileFaker Maven / Gradle / Ivy

Go to download

A set of command line tools (in Java) for manipulating high-throughput sequencing (HTS) data and formats such as SAM/BAM/CRAM and VCF.

There is a newer version: 3.2.0
Show newest version
package picard.illumina.parser.fakers;

import java.nio.ByteBuffer;

/**
 * Created by jcarey on 3/13/14.
 */
public class MultiTileLocsFileFaker extends FileFaker {

    @Override
    protected void fakeFile(final ByteBuffer buffer) {
        buffer.putInt(1);
        buffer.putFloat(1.0f);
        buffer.putInt(1);
        for (int count = 0; count < tiles.size(); count++) {
            buffer.putFloat(5.0f + (count * 0.5f));
            buffer.putFloat(5.0f + (count * 0.5f));
        }
    }

    @Override
    protected boolean addLeadingZeros() {
        return false;
    }

    @Override
    protected int bufferSize() {
        return (Integer.SIZE * 2) + (Float.SIZE * tiles.size()) + Float.SIZE;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy