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

add aggregate_spike_count to reports.py #955

Merged
merged 3 commits into from
Jun 5, 2019
Merged

Conversation

tomkinsc
Copy link
Member

This adds a new function, aggregate_spike_count, to reports.py to produce a matrix of spike-in counts per-sample from a directory containing array of per-sample spike-in count files. This is in contrast to consolidate_spike_count which simply concatenates the count files (without extraneous columns).

add a new function, aggregate_spike_count, to reports.py to produce a matrix of spike-in counts per-sample from an array of per-sample spike-in count files
reports.py Outdated
spike_in_sample_counts[spike][s] = count
#outf.write('\t'.join([s, spike, count]) + '\n')
outf.write("\t".join(["spike-in"]+samples_seen)+"\n")
for spike in spike_in_sample_counts.keys():
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorted IDs or OrderedDict?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks!

reports.py Outdated


def parser_aggregate_spike_count(parser=argparse.ArgumentParser()):
parser.add_argument('inDir', help='Input spike count directory.')
Copy link
Contributor

Choose a reason for hiding this comment

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

metavar these so variables can avoid camelcasing?

sort spike-ins listed in aggregated report; also metavar positional args to avoid camel case in signature of called function. path used as base for glob is now passed through realpath to standardize the path a bit more and allow paths specified with or without trailing slashes (realpath removes them if present)
@tomkinsc tomkinsc merged commit 9880a1c into master Jun 5, 2019
@tomkinsc tomkinsc deleted the ct-aggregate-spike-counts branch June 5, 2019 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants