id
stringlengths
36
36
text
stringlengths
1
1.25M
7063657b-6705-4884-a155-e04de1821df2
public void setEffReadLength(int effReadLength) { this.effReadLength = effReadLength; }
9d39fab9-9d3f-4dcc-984a-542fce8c8395
public ReferenceReadPosition(byte[] nucleotidesInReference, byte[] affectedRefAllel, int indexOfRefAllele) { this.setNucleotideInReference(nucleotidesInReference); if (affectedRefAllel.length == 1) { this.refAllel = (char) affectedRefAllel[0]; } this.indexOfRefAllele = indexOfRefAllele; }
46f421d1-6248-497a-b4ac-cbedc05b55d8
public static ReferenceReadPosition getReferenceReadPositionInstance( String string, int posInContig, int flankingRevBp, int flankingForBp) { ReferenceSequence rf = CheKov.getIndexedFastaSequenceFile_Ref() .getSubsequenceAt(string, posInContig - flankingRevBp, posInContig + flankingForBp); // the cons...
e7467289-681f-4f7f-afb0-b4302af435a0
public byte[] getNucleotideInReference() { return nucleotidesInReference; }
b738468e-9f3c-4d25-b558-7297e322fb0e
public void setNucleotideInReference(byte[] nucleotideInReference) { this.nucleotidesInReference = nucleotideInReference; }
7cf93ca2-3ff7-48f1-b43e-0802e99c95d5
@Override public String toString() { String s = ""; for (byte b : nucleotidesInReference) { s = s + String.format("%c", b); } return "[" + s + "]"; }
2e90def5-9158-46a0-ad06-e349bad3dc4b
public char getRefAllel() { return refAllel; }
fcf29232-b796-46b6-8865-3c63d0006722
public void setRefAllel(char refAllel) { this.refAllel = refAllel; }
0f64d284-5050-4360-a562-c598ae09f209
public int getIndexOfRefAllele() { return indexOfRefAllele; }
e10e8efb-5ec9-453b-ac6a-7853985a41b4
public void setIndexOfRefAllele(int indexOfRefAllele) { this.indexOfRefAllele = indexOfRefAllele; }
e44beecc-1aae-4c03-b10f-8c1672896ccb
public static void main(String[] args) { try { IndexedFastaSequenceFile ifsf = new IndexedFastaSequenceFile( new File( "/home/dboehm/NewReference_2012_06_24/share/reference/genomes/NCBI_GRCh37/NCBI_GRCh37.fa")); System.out.println(ifsf.isIndexed()); ReferenceSequence rs = ifsf.getSequence("chr1")...
3a65be91-f653-4625-af9c-caf37ed82a81
Node(IntervalAbs newData) { left = null; right = null; data = newData; }
6af5a029-918f-4da9-ad6d-9e99b9c0e340
public BinaryTreeIntervalHelper() { root = null; }
03bc6b6e-1caa-417f-b02b-593ce42159d8
public boolean lookup(IntervalAbs data) { return (lookup(root, data)); }
4e33f170-7012-41fc-81bd-3dddfffb9e6a
private boolean lookup(Node node, IntervalAbs data) { if (node == null) { return (false); } if (data == node.data) { return (true); } else if (data.getStartAbs() < node.data.getStartAbs()) { return (lookup(node.left, data)); } else { return (lookup(node.right, data)); } }
e698c90c-6824-41d3-839e-cc20c2e5cd4e
public void insert(IntervalAbs data) { root = insert(root, data); }
4cdf746b-1d53-4aa1-a1f8-c21c49ba8899
private Node insert(Node node, IntervalAbs data) { if (node == null) { node = new Node(data); } else { if (data.getStartAbs() <= node.data.getStartAbs()) { node.left = insert(node.left, data); } else { node.right = insert(node.right, data); } } return (node); // in any case, return the new ...
099a4231-f356-4e8f-aa6e-0e27c56670fb
public int size() { return (size(root)); }
14a69770-f620-4af4-8d3d-a7d123410e91
private int size(Node node) { if (node == null) return 0; else return (size(node.left) + 1 + size(node.right)); }
746596fe-e343-4975-9fec-34cca910cafe
public int maxDepth() { return (maxDepth(root)); }
38643cbd-03e8-4af3-9b39-f3fe337a0a90
private int maxDepth(Node node) { if (node == null) return 0; else { int lDepth = maxDepth(node.left); int rDepth = maxDepth(node.right); // use the larger + 1 return (Math.max(lDepth, rDepth) + 1); } }
2147aba7-70aa-45bc-9348-8607b16055c2
public IntervalAbs minValue() { return (minValue(root)); }
c001ce02-2be8-410b-af30-b38a73a77059
private IntervalAbs minValue(Node node) { Node current = node; while (current.left != null) current = current.left; return current.data; }
8c45720a-9248-4d3e-9230-5b0538533735
public IntervalAbs maxValue() { return (maxValue(root)); }
f813a712-bad9-4743-a165-350e1327ebe4
private IntervalAbs maxValue(Node node) { Node current = node; while (current.right != null) current = current.right; return current.data; }
9ba32b60-f84a-4533-9516-d30cee51b099
public void printTree() { printTree(root); System.out.println(); }
1cc9286e-7d19-4ae4-912f-7bc6796567df
private void printTree(Node node) { if (node == null) return; // left, node itself, right printTree(node.left); System.out.print(node.data + " "); printTree(node.right); }
67725112-3b89-440e-9823-a8f0d4278633
public void printPostorder() { printPostorder(root); System.out.println(); }
24f48924-f612-4296-8ee5-c78779cbc441
public void printPostorder(Node node) { if (node == null) return; // first recur on both subtrees printPostorder(node.left); printPostorder(node.right); // then deal with the node System.out.print(node.data + " "); }
1f81158d-5aed-4f06-858a-bb1c0247f101
public void printPaths() { long[] path = new long[1000000]; printPaths(root, path, 0); // for (int i : path) // System.out.println(i); }
e1b3c0b6-165a-458d-b60e-8f9c977dde21
private void printPaths(Node node, long[] path, int pathLen) { if (node == null) return; path[pathLen] = node.data.getStartAbs(); pathLen++; // it's a leaf, so print the path that led to here. It is a leaf, if // node.left AND node.roght = NULL if (node.left == null && node.right == null) { for (int i...
b992e295-bb86-45d4-90ab-d93e6a289e47
public void mirror() { mirror(root); }
bb7ed9c2-7621-4ba6-9aeb-081b38cab1ea
private void mirror(Node node) { if (node != null) { // do the sub-trees mirror(node.left); mirror(node.right); Node temp = node.left; node.left = node.right; node.right = temp; } }
c1808cc3-8fbc-4d11-9177-31d5254f7d2e
public void printInOrder(Node node) { if (node != null) { printInOrder(node.left); System.out.println(" Traversed " + node.data); printInOrder(node.right); } }
f3b20a8e-5df5-4ad6-8605-e94fa0325753
public static void main(String[] args) { try (BufferedReader br = new BufferedReader(new FileReader(args[0]))) { String line; while ((line = br.readLine()) != null) { String[] lineFields = line.split("\t"); createAnnotationSet(lineFields[0]); Annovar_GATK_SNV_Entry annovarGATKSNV_Entry = new Annova...
fb70085c-154a-43c8-a617-adc44cf24b8e
private static void createAnnotationSet(String s) { AnnovarAnnotation newAnno = new AnnovarAnnotation(s); if (!annotationEntries.contains(newAnno)) { annotationEntries.add(newAnno); } else { for (AnnovarAnnotation anno : annotationEntries) { if (anno.equals(newAnno)) { anno.setCount(anno.getCount()...
fc6e97b2-b0a7-4e79-ae36-4e39082ae65c
public static void main(String[] args) { CheKov.setStartTime(Math.abs(System.nanoTime())); String bedfile = args[0]; String bamfile = args[1]; String outfile = args[2]; String missedBEDFile = args[3]; // we need to do IMPORTANTLY some useful things with this parameter IntervalAbs.INTERVAL_THRESHOLD = Inte...
9a403313-1b72-4430-82a8-bd3711a250ba
public static void printQCResult() { System.out.printf("%-35s%,12d%n%-35s%,12d%n%-35s%,12d%n", "All Reads: ", ReadEntry.getReadCount(), "FragmentReads:", FragmentReadEntry.getFragmentReadCount(), "PairedReads:", PairedReadEntry.getPairedEndReadCount()); System.out.printf("%-35s%,12d%n%-35s%,12d%n", "OnT...
d4b003b0-e17f-4e8d-bdb4-88753dab8d45
public static int medianFromArray(int[] array) { int counter = ReadEntry.getReadCount(); for (int i = 0; i < 2000; i++) { counter = counter - array[i]; if (counter <= (int) ReadEntry.getReadCount() / 2) { return i; } } return 0; }
8705c515-fefa-459f-adce-a2eac6794dbb
public static TreeSet<IntervalAbs> getIntervalTreeSet() { return intervalTreeSet; }
445883e6-6946-4a06-a861-973eb662a0bd
public static void setIntervalTreeSet(TreeSet<IntervalAbs> intervalTreeSet) { CheKov.intervalTreeSet = intervalTreeSet; }
be5b5595-13b1-4807-a273-2d3e2126e1e8
public static long getAllBases() { return allBases; }
7474a138-6ff1-4117-aa52-33b29b71c3a5
public static void setAllBases(long allBases) { CheKov.allBases = allBases; }
189ce9a1-f31d-4fc2-baa9-5246d0d03cc8
public static long getAllHardClippedBases() { return allHardClippedBases; }
b5417dca-9ae8-45c5-b6d9-d117efec9417
public static void setAllHardClippedBases(long allHardClippedBases) { CheKov.allHardClippedBases = allHardClippedBases; }
80a9033e-2e2a-45e1-9fd5-284e5acca2b7
public static long getAllSoftClippedBases() { return allSoftClippedBases; }
cf5c259e-8650-4007-ba34-1d45f3604c1e
public static void setAllSoftClippedBases(long allSoftClippedBases) { CheKov.allSoftClippedBases = allSoftClippedBases; }
69874884-d04d-4a7b-95cb-99d907000d37
public static long getAllDeletedTaggedBases() { return allDeletedTaggedBases; }
61be066a-604e-46d4-9abb-89864da4d7d8
public static void setAllDeletedTaggedBases(long allDeletedTaggedBases) { CheKov.allDeletedTaggedBases = allDeletedTaggedBases; }
2a945dfc-ef3a-4671-a793-1dca95206721
public static long getAllInsertedTaggedBases() { return allInsertedTaggedBases; }
48c08cdf-887e-4679-b585-56e18dc1d74e
public static void setAllInsertedTaggedBases(long allInsertedTaggedBases) { CheKov.allInsertedTaggedBases = allInsertedTaggedBases; }
918a85b7-9233-4bbd-967e-788ce1dc0b2c
public static long getAllDeletedTaggedReads() { return allDeletedTaggedReads; }
faec46a9-1d87-4b66-8544-dcf45353bc2d
public static void setAllDeletedTaggedReads(long allDeletedTaggedReads) { CheKov.allDeletedTaggedReads = allDeletedTaggedReads; }
8165167a-4822-4639-b7f9-66398ac4bfa2
public static long getAllInsertedTaggedReads() { return allInsertedTaggedReads; }
17c3edde-9f9e-4350-8f93-a663e8148068
public static void setAllInsertedTaggedReads(long allInsertedTaggedReads) { CheKov.allInsertedTaggedReads = allInsertedTaggedReads; }
350b1a3a-dfe7-408d-92a8-05b98601188c
public static long getAllEitherDeletedOrInsertedTaggedReads() { return allEitherDeletedOrInsertedTaggedReads; }
07944a9b-b76a-4955-93a4-de6e942f01dc
public static void setAllEitherDeletedOrInsertedTaggedReads( long allEitherDeletedOrInsertedTaggedReads) { CheKov.allEitherDeletedOrInsertedTaggedReads = allEitherDeletedOrInsertedTaggedReads; }
c4064fd1-65aa-431b-b1e1-29123baec263
public static long getMedianEffReadLength() { return medianEffReadLength; }
3fa7fb64-a640-48df-9e0b-d831a2cfe67d
public static void setMedianEffReadLength(long medianEffReadLength) { CheKov.medianEffReadLength = medianEffReadLength; }
9cdd68c0-661e-459e-b2cd-04b462d1e378
public static long getMedianRawReadLength() { return medianRawReadLength; }
4db727ad-3ed1-43ad-9e1b-a6e64facc60c
public static void setMedianRawReadLength(long medianRawReadLength) { CheKov.medianRawReadLength = medianRawReadLength; }
e75f7f2f-8a86-498a-9ff0-2b6ccd9244ad
public static long getAvEffReadLength() { return avEffReadLength; }
ada0fb63-9143-4f08-96b3-391c8b6d9da0
public static void setAvEffReadLength(long avEffReadLength) { CheKov.avEffReadLength = avEffReadLength; }
598c564f-e9d9-41be-8142-6339b094300b
public static long getAvRawReadLength() { return avRawReadLength; }
64561811-0006-4ace-854b-f8e0c2dc4568
public static void setAvRawReadLength(long avRawReadLength) { CheKov.avRawReadLength = avRawReadLength; }
6792a51a-381f-4e47-88ab-ebba809b61f3
public static TreeSet<TargetNucleotidePositionEntry> getAlteredNucleotidePositionsEntries() { return alteredNucleotidePositionsEntries; }
5c7cc631-40d7-4f9a-9c2a-6a16d804b650
public static void setAlteredNucleotidePositionsEntries( TreeSet<TargetNucleotidePositionEntry> alteredNucleotidePositionsEntries) { CheKov.alteredNucleotidePositionsEntries = alteredNucleotidePositionsEntries; }
010ecaf6-8c70-4df4-a9c1-c180bebfa9c1
public static long getStartTime() { return startTime; }
f55e1f50-7b39-4f34-be09-41e887b1487f
public static void setStartTime(long startTime) { CheKov.startTime = startTime; }
363778b6-7096-4dc2-b6a3-652d18b619c6
public static long getEndTime() { return endTime; }
c27a3646-a3de-463c-b484-afec5c8f5c22
public static void setEndTime(long endTime) { CheKov.endTime = endTime; }
25d1eb6f-3385-449c-b650-05454a49198e
public static IndexedFastaSequenceFile getIndexedFastaSequenceFile_Ref() { return indexedFastaSequenceFile_Ref; }
473754ef-5bee-4e57-a032-def6197cc90e
public static void setIndexedFastaSequenceFile_Ref( IndexedFastaSequenceFile indexedFastaSequenceFile_Ref) { CheKov.indexedFastaSequenceFile_Ref = indexedFastaSequenceFile_Ref; }
dae3bc29-efeb-43de-844c-4342a5219c34
public Annovar_GATK_SNV_Entry(String annotationType, String gene, GATK_SNV_entry gatk_SNV_entry) { // this seems to be redundant, but at the moment necessary because of // the missing super() constructor. Needs to be addressed super(gatk_SNV_entry.getChr(), gatk_SNV_entry.getGenomPosition(), gatk_SNV_entry...
3464db4b-946e-40e1-986c-e5988e373eb9
public String getAnnotationType() { return annotationType; }
8f6c3258-78bd-4946-a887-4607202ff3d1
public void setAnnotationType(String annotationType) { this.annotationType = annotationType; }
c9223a9f-5ee2-45f4-8797-f3e17335b199
public String getGene() { return gene; }
f95529f9-a550-487e-8e71-caa6335fed35
public void setGene(String gene) { this.gene = gene; }
203f3c2b-8057-4754-b478-54046a6d8045
public GATK_SNV_entry getGatk_SNV_entry() { return gatk_SNV_entry; }
4be286ac-d8fc-46fd-8cec-c9b8a990609a
public void setGatk_SNV_entry(GATK_SNV_entry gatk_SNV_entry) { this.gatk_SNV_entry = gatk_SNV_entry; }
f35f8392-1bf2-4624-a7d6-25165ef5dfbc
public AnnovarAnnotation(String annotation) { this.setAnnotation(annotation); this.count = 1; }
81e2e4ed-e5a6-4a60-a01e-8704268bb087
public String getAnnotation() { return annotation; }
55f873b8-bb64-4e0d-a42f-5c327351b821
public void setAnnotation(String annotation) { this.annotation = annotation; }
fa3fa416-ed29-45c7-8426-db48bad0bcb4
public Integer getCount() { return count; }
6a91d380-f043-45f4-ad08-9f23f21d969f
public void setCount(Integer count) { this.count = count; }
aa6ffd9a-6f33-47dc-82b8-4dc590b659cf
@Override public boolean equals(Object obj) { if (obj == null) return false; if (obj == this) return true; if (!(obj instanceof AnnovarAnnotation)) return false; AnnovarAnnotation that = (AnnovarAnnotation) obj; return (that.annotation.equals(this.annotation)); }
a7f8bf9a-8f2c-40c7-b1a8-5cc95dffaf51
@Override public int compareTo(Object obj) { AnnovarAnnotation that = (AnnovarAnnotation) obj; return this.annotation.compareTo(that.annotation); }
9533f31e-99c5-49c6-94dd-2b437c36b68c
public ObjectDDL(String objectName, String objectDDL, String schema, String type) { _objectName = objectName; String s = Character.toString((char) 10); String sFrom = s+s; _objectDDL = objectDDL.replaceAll(sFrom, s).trim(); // Terminatore per oggetti codice if (type=="FUNCTION" | type=="PROCEDUR...
f6f8ba6e-e5e7-41ee-9aff-254527bca939
public String Elabora(String outputFolder, String subf) { System.out.println("Estrazione ddl per l'oggetto ["+_objectName+"]"); String fileName = _type+"."+_objectName+".sql"; try { FileWriter fstream = new FileWriter(outputFolder+"/"+subf+"/"+fileName); BufferedWriter out = new BufferedWriter(fstr...
8d7df323-2702-43d9-8b5c-0c9fba226a7f
public DbObjectType() { }
53d2e20d-34a0-46a5-ba2c-61de95bcbb5c
public DbObjectType(Connection c, String schema) { this._conn = c; this._schema = schema; this._mapSql = new HashMap<String, String>(); /* _hmSql.put("TABLE", "select object_name, DBMS_METADATA.GET_DDL('TABLE',object_name) from user_objects where object_type = 'TABLE' and generated = 'N'"); _hmSq...
2fc33238-830b-46e3-9320-9bc6fef2edbf
public ObjectDDLContainer ExtractDDL(String type) { System.out.println("Estrazione oggetti di tipo. ["+type+"]."); Clob lobValue; ObjectDDLContainer a = new ObjectDDLContainer(type, _schema); try { Statement stmt = _conn.createStatement(); ResultSet rs = stmt.executeQuery(_mapSql.get(ty...
5f0a4c05-412e-4e29-bfc0-35550b03c540
public static String getTerminator() { return _terminator; }
77492a96-8a6c-4b65-a76e-67dcfe13ed49
public static void main(String[] args) { // TODO Auto-generated method stub //String a = System.getProperty("line.separator"); //System.out.println(a); String s = Character.toString((char) 13)+Character.toString((char) 10); _terminator = s; /*args = new String[4]; args[0] = "-username=suetl01"...
6332d83c-1cb0-4c04-a192-61c0e551be99
private static String getArgs(String[] args, String name) { String[] values; for (int i=0;i<args.length;i++) { //System.out.println(args[i]+'\n'); if (args[i].indexOf("-"+name)!=-1) { values = args[i].split("="); //System.out.println(values[1]+'\n'); return values[1]; } } r...
06b3072b-2739-46f8-b3cc-4bc07f47e68e
private static boolean getArgsB(String[] args, String name) { String[] values; for (int i=0;i<args.length;i++) { //System.out.println(args[i]+'\n'); if (args[i].indexOf("-"+name)!=-1) { values = args[i].split("="); //System.out.println(values[1]+'\n'); if (values[1]=="false") re...
132afd74-75a5-464f-b1a9-2645c6ecb4c7
public DDLConnection(String cs, String outputFolder, String userName, String password, boolean withTables, String outputObjs, String outputCode) { try { System.out.println("Connessione al db oracle."); DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver()); _conn = DriverManager.getConnectio...
e3739819-1ba8-4fc4-bb99-5daf9ad5cbf9
public void close() { try { _conn.close(); } catch (SQLException se) { System.out.println(se.getMessage()); System.out.println(se.getStackTrace().toString()); } }
df9bae28-31b6-466d-a416-c646a9fc3b42
public void writeLine(String type, DbObjectType o, BufferedWriter out, String sort, String subf) { String line; try { line = o.ExtractDDL(type).elaboraFile(_outputFolder, sort, subf); if (line!="") out.write("@"+line+DDLExtractor.getTerminator()); } catch (IOException ioe) { System.out...
106be93d-340b-453a-80e2-fc58df9a5317
public void ExtractDDL() { DbObjectType o = new DbObjectType(_conn, _schema); // Creazione del file master String fileName = _outputFolder+"/01.main.sql"; try { System.out.println("Inizio elaborazione oggetti."); FileWriter fstream = new FileWriter(fileName); BufferedWriter out = new B...