Skip to content

Commit

Permalink
Do not attempt to get drs URIs for bam file if experimental strategy …
Browse files Browse the repository at this point in the history
…is RNA-seq.
  • Loading branch information
cbirger committed Apr 16, 2020
1 parent 38c0857 commit c2c4fb4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions fcgdctools/fc_loadfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,9 @@ def _add_file_attribute(entity_id, entity, file_uuid, filename,

if chosen_uuid == file_uuid:
entity[basename + DRS_URL_ATTRIBUTE_SUFFIX] = _create_drs_url(file_uuid)
if data_format == 'BAM':
print("experimental strategy: {0}".format(experimental_strategy))
# GDC does not provide index files for RNA-Seq BAMs
if data_format == 'BAM'and experimental_strategy != 'RNA-Seq':
bai_basename = basename.replace('__bam__', '__bai__')
indexFileUuidRetriever = IndexFileUuidRetriever(gdc_api_root)
bai_uuid = indexFileUuidRetriever.get_index_uuid(file_uuid)
Expand All @@ -753,7 +755,9 @@ def _add_file_attribute(entity_id, entity, file_uuid, filename,
return
else:
entity[basename + DRS_URL_ATTRIBUTE_SUFFIX] = _create_drs_url(file_uuid)
if data_format == 'BAM':

# GDC does not provide index files for RNA-Seq BAMs
if data_format == 'BAM'and experimental_strategy != 'RNA-Seq':
bai_basename = basename.replace('__bam__', '__bai__')
indexFileUuidRetriever = IndexFileUuidRetriever(gdc_api_root)
bai_uuid = indexFileUuidRetriever.get_index_uuid(file_uuid)
Expand Down

0 comments on commit c2c4fb4

Please sign in to comment.