Skip to content

Commit

Permalink
Hotfix/imgag fastq vcf processing (#110)
Browse files Browse the repository at this point in the history
* fix concatenation of string and list for debugging

* fix reference to undefined variable
  • Loading branch information
wow-such-code authored Feb 15, 2023
1 parent b96d418 commit df5b42d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions drop-boxes/register-imgag-dropbox/register-imgag.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ def find_and_register_vcf(transaction, jsonContent, varcode, parentCodeSet):#var

if len(testParentIdentifiers) != len(geneticIDS):
print("Referenced sample identifiers do not fit the amount of known samples:")
print("Genetics Identifiers: " + geneticIDS)
print("Related sample ids in openBIS: " + testParentIdentifiers)
print("Genetics Identifiers: " + str(geneticIDS))
print("Related sample ids in openBIS: " + str(testParentIdentifiers))
raise AssertionError("Referenced samples do not match metadata found in openBIS. Sequencing data might not be registered or indexed yet. Rerunning registration later might solve this problem.")

numberOfExperiments += 1
Expand All @@ -238,7 +238,7 @@ def find_and_register_vcf(transaction, jsonContent, varcode, parentCodeSet):#var

newVCExp = transaction.createNewExperiment(newExpID, "Q_NGS_VARIANT_CALLING")

print('test sample parent identifiers: ' + testParentIdentifiers)
print('test sample parent identifiers: ' + str(testParentIdentifiers))
identString = '_'.join([tpi.split('/')[-1] for tpi in testParentIdentifiers])

print('id string for vcf sample: ' + identString)
Expand All @@ -250,12 +250,12 @@ def find_and_register_vcf(transaction, jsonContent, varcode, parentCodeSet):#var

found = False
freeID = "01"#varcode.split('_')[-1]""
newVCFID = '/' + space + '/' + 'VC'+ freeID + identString2
newVCFID = '/' + space + '/' + 'VC'+ freeID + identString
while newVCFID in existingSampleIDs or found:
existingSampleIDs.append(newVCFID)
freeID = str(int(freeID) + 1).zfill(len(freeID))
print('new id test: '+newVCFID)
newVCFID = '/' + space + '/' + 'VC'+ freeID + identString2
print('new id test: ' + newVCFID)
newVCFID = '/' + space + '/' + 'VC'+ freeID + identString
found = transaction.getSampleForUpdate(newVCFID)

newVCSample = transaction.createNewSample(newVCFID, "Q_NGS_VARIANT_CALLING")
Expand Down

0 comments on commit df5b42d

Please sign in to comment.