Skip to content

Commit

Permalink
Add XLS template, set scores to highest values for complexes
Browse files Browse the repository at this point in the history
  • Loading branch information
mikessh committed Apr 25, 2016
1 parent d6c0dc5 commit fa090d2
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 22 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ The ``BuildDatabase`` routine ran during CI tests upon each submission and prior

To view the list of papers that were not yet processed follow [here](https://github.com/antigenomics/vdjdb-db/labels/paper).

An XLS template is available [here](https://raw.githubusercontent.com/antigenomics/vdjdb-db/master/template.xls).

> **CAUTION** make sure that nothing is messed up (``x/X`` frequencies are transformed to dates, bad encoding, etc) when importing from XLS template. The format of all fields is pre-set to *text* to prevent this case.
## Database specification

Each database submission in ``chunks/`` folder should have the following header and columns:
Expand Down
50 changes: 28 additions & 22 deletions src/VdjdbScoreFactory.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -24,35 +24,41 @@ class VdjdbScoreFactory {
masterTable.each { row ->
def sign = getSignature(row), score = getScore(row)

if (MHC_MULTIMER.any {
row["method.identification"].toLowerCase().contains("$it-sort")
}) {
// If identified using tetramer use frequency to assign score
// Otherwise score is 0
def freq = row["method.frequency"].trim()
if (row["meta.complex.id"].trim().length() > 0) {
score = 100 // we have structure, any questions? :)
} else {
if (MHC_MULTIMER.any {
row["method.identification"].toLowerCase().contains("$it-sort")
}) {
// If identified using tetramer use frequency to assign score
// Otherwise score is 0
def freq = row["method.frequency"].trim()

if (freq.length() > 0) {
def x = freq.split("/+").collect { it.toInteger() }
if (freq.length() > 0) {
def x = freq.split("/+").collect { it.toInteger() }

if (x[0] > 1 && (x[0] / (double) x[1]) >= 0.1) {
score += 2
if (x[0] > 1 && (x[0] / (double) x[1]) >= 0.1) {
score += 2
}
}
}
}

def verifyMethod = row["method.verification"].toLowerCase()
def verifyMethod = row["method.verification"].toLowerCase()

if (verifyMethod.contains("targets")) {
// Verification with target cells
score += 4
} else if (verifyMethod.contains("stain")) {
// Verification by cloning & re-staining
score += 2
}
if (verifyMethod.contains("targets")) {
// Verification with target cells
score += 4
} else if (verifyMethod.contains("stain")) {
// Verification by cloning & re-staining
score += 2
}

if (row["method.singlecell"] != "") {
// Single-cell sequencing performed
score += 1
}

if (row["method.singlecell"] != "") {
// Single-cell sequencing performed
score += 1
score = Math.min(score, 100)
}

scoreMap[sign] = score
Expand Down
Binary file added template.xls
Binary file not shown.

0 comments on commit fa090d2

Please sign in to comment.