Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds query to pull unreleased files. #110

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions ENCODE_is_complete.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,18 @@ def main():
results['status issues'] = status_issues

# Inspect files
query = "/search/?type=File&dataset=/experiments/"+obj['accession']+'/'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think we can use @id here and string formatting.
query = '/search/?type=File&dataset={}'.format(obj['@id'])

r = get_ENCODE(query, connection, frame='embedded')
all_files = r['@graph']

good_files = [f for f in obj['files']
good_files = [f for f in all_files
if f['status'] in ['released', 'in progress']]
fastqs = [f for f in obj['files'] if f['status']
in ['released', 'in progress']]
print("There are files in this experiment:", len(obj['files']))
print("There are files in this experiment:", len(all_files))
print("There are good files in this experiment:", len(good_files))
# look for unarchived processed files from other labs
processed_files = [f for f in obj['files']
processed_files = [f for f in all_files
if f['file_format'] != 'fastq']
external_files = [f for f in processed_files if (
f['lab']['name'] != 'encode-processing-pipeline')]
Expand Down