edu.iastate.jtm.jmed
Class PubMedSampler
java.lang.Object
edu.iastate.jtm.jmed.PubMedSampler
public class PubMedSampler
- extends java.lang.Object
Randomly sample PubMed files.
- Author:
- Jing Ding
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PubMedSampler
public PubMedSampler()
randomSample
public void randomSample(int groups,
int size,
long max)
getGroupNum
public int getGroupNum()
getGroupSize
public int getGroupSize()
getSampleSize
public int getSampleSize()
getSamples
public long[] getSamples()
setRandomize
public void setRandomize(boolean ran)
samplePmidFromFile
public void samplePmidFromFile(java.io.File infile)
throws java.io.IOException
- Random sample PMIDs from a file containing a list of PMIDs: 1 PMID/line.
- Throws:
java.io.IOException
samplePmidFromParser
public void samplePmidFromParser(MedlineParser parser)
throws org.dom4j.DocumentException,
java.io.IOException
- Throws:
org.dom4j.DocumentException
java.io.IOException
sampleXmlFromParser
public void sampleXmlFromParser(MedlineParser parser,
java.lang.String prefix,
boolean compress)
throws org.dom4j.DocumentException,
java.io.IOException
- Throws:
org.dom4j.DocumentException
java.io.IOException
samplePlainFromParser
public void samplePlainFromParser(MedlineParser parser,
java.lang.String prefix)
throws org.dom4j.DocumentException,
java.io.IOException
- Throws:
org.dom4j.DocumentException
java.io.IOException
samplePmidFromQuerier
public void samplePmidFromQuerier(PubMedQuerier querier)
throws org.dom4j.DocumentException,
java.io.IOException
- Throws:
org.dom4j.DocumentException
java.io.IOException
writeSampleToFile
public void writeSampleToFile(java.lang.String prefix)
throws java.io.IOException
- Throws:
java.io.IOException
getSampledPmids
public java.lang.String[][] getSampledPmids()
copySampleGroup
public void copySampleGroup(java.lang.String[] sample,
int group)