Created
May 4, 2018 21:43
-
-
Save ivirshup/42e70a745704b8c71d78e57dd43e3b0b to your computer and use it in GitHub Desktop.
scanpy scaling issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib | |
matplotlib.use('Agg') # plotting backend compatible with screen | |
import scanpy.api as sc | |
from argparse import ArgumentParser | |
sc.settings.verbosity = 4 # show logging output | |
def main(): | |
parser = ArgumentParser( | |
description="Reads in 10x hdf5 file and write a h5ad file.") | |
parser.add_argument("inpth", | |
help="10x hdf5 file to read.") | |
parser.add_argument("outpth", | |
help="Path to write h5ad file to.") | |
args = parser.parse_args() | |
sc.logging.print_versions() | |
sc.logging.print_memory_usage() | |
adata = sc.read_10x_h5(args.inpth) | |
sc.logging.print_memory_usage() | |
adata.write(args.outpth) | |
if __name__ == "__main__": | |
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib | |
matplotlib.use('Agg') # plotting backend compatible with screen | |
import sys | |
import scanpy.api as sc | |
sc.settings.verbosity = 4 # show logging output | |
def main(): | |
filename = sys.argv[1] | |
sc.logging.print_versions() | |
sc.logging.print_memory_usage() | |
adata = sc.read(filename) | |
sc.logging.print_memory_usage() | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment