Commit 9253b7fc authored by joweb106's avatar joweb106
Browse files

joined loom file and started analysis

parent f7cce0e1
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import velocyto as vcy\n",
"\n",
"vlm = vcy.VelocytoLoom(\"../data/52_NGS_EPDC_merged.loom\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"vlm.plot_fractions()"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'CellID': array(['52_NGS_MI1_EPDC:AAAGATGCACTCGACGx',\n",
" '52_NGS_MI1_EPDC:AAACGGGCACCGTTGGx',\n",
" '52_NGS_MI1_EPDC:AAACCTGAGTGCAAGCx', ...,\n",
" '52_NGS_MI3_EPDC:TTGCGTCCAGAGTGTGx',\n",
" '52_NGS_MI3_EPDC:TTTCCTCCACACCGACx',\n",
" '52_NGS_MI3_EPDC:TTCTACAGTAAAGTCAx'], dtype=object)}"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"vlm.ca"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"vlm.filter_cells(bool_array=vlm.initial_Ucell_size > \n",
" np.percentile(vlm.initial_Ucell_size, 0.5))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
%% Cell type:code id: tags:
``` python
import numpy as np
import velocyto as vcy
vlm = vcy.VelocytoLoom("../data/52_NGS_EPDC_merged.loom")
```
%% Cell type:code id: tags:
``` python
vlm.plot_fractions()
```
%% Cell type:code id: tags:
``` python
vlm.ca
```
%%%% Output: execute_result
{'CellID': array(['52_NGS_MI1_EPDC:AAAGATGCACTCGACGx',
'52_NGS_MI1_EPDC:AAACGGGCACCGTTGGx',
'52_NGS_MI1_EPDC:AAACCTGAGTGCAAGCx', ...,
'52_NGS_MI3_EPDC:TTGCGTCCAGAGTGTGx',
'52_NGS_MI3_EPDC:TTTCCTCCACACCGACx',
'52_NGS_MI3_EPDC:TTCTACAGTAAAGTCAx'], dtype=object)}
%% Cell type:code id: tags:
``` python
vlm.filter_cells(bool_array=vlm.initial_Ucell_size >
np.percentile(vlm.initial_Ucell_size, 0.5))
```
%% Cell type:code id: tags:
``` python
```
import loompy
files = ["../../singlecell_data/cellranger_count/52_NGS_MI1_EPDC/velocyto/52_NGS_MI1_EPDC.loom",
"../../singlecell_data/cellranger_count/52_NGS_MI2_EPDC/velocyto/52_NGS_MI2_EPDC.loom",
"../../singlecell_data/cellranger_count/52_NGS_MI3_EPDC/velocyto/52_NGS_MI3_EPDC.loom"]
ds = loompy.combine(files, "../data/52_NGS_EPDC_merged.loom")
#ds = loompy.connect("../data/52_NGS_EPDC_merged.loom")
#for fn in files[1:]:
# ds.add_loom(fn, batch_size=1000)
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import velocyto as vcy\n",
"\n",
"vlm = vcy.VelocytoLoom(\"../data/52_NGS_EPDC_merged.loom\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"vlm.plot_fractions()"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'CellID': array(['52_NGS_MI1_EPDC:AAAGATGCACTCGACGx',\n",
" '52_NGS_MI1_EPDC:AAACGGGCACCGTTGGx',\n",
" '52_NGS_MI1_EPDC:AAACCTGAGTGCAAGCx', ...,\n",
" '52_NGS_MI3_EPDC:TTGCGTCCAGAGTGTGx',\n",
" '52_NGS_MI3_EPDC:TTTCCTCCACACCGACx',\n",
" '52_NGS_MI3_EPDC:TTCTACAGTAAAGTCAx'], dtype=object)}"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"vlm.ca"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"vlm.filter_cells(bool_array=vlm.initial_Ucell_size > \n",
" np.percentile(vlm.initial_Ucell_size, 0.5))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
%% Cell type:code id: tags:
``` python
import numpy as np
import velocyto as vcy
vlm = vcy.VelocytoLoom("../data/52_NGS_EPDC_merged.loom")
```
%% Cell type:code id: tags:
``` python
vlm.plot_fractions()
```
%% Cell type:code id: tags:
``` python
vlm.ca
```
%%%% Output: execute_result
{'CellID': array(['52_NGS_MI1_EPDC:AAAGATGCACTCGACGx',
'52_NGS_MI1_EPDC:AAACGGGCACCGTTGGx',
'52_NGS_MI1_EPDC:AAACCTGAGTGCAAGCx', ...,
'52_NGS_MI3_EPDC:TTGCGTCCAGAGTGTGx',
'52_NGS_MI3_EPDC:TTTCCTCCACACCGACx',
'52_NGS_MI3_EPDC:TTCTACAGTAAAGTCAx'], dtype=object)}
%% Cell type:code id: tags:
``` python
vlm.filter_cells(bool_array=vlm.initial_Ucell_size >
np.percentile(vlm.initial_Ucell_size, 0.5))
```
%% Cell type:code id: tags:
``` python
```
2019-12-14 01:22:41,925 - DEBUG - Using logic: Default
2019-12-14 01:22:41,960 - INFO - Read 15539 cell barcodes from /gpfs/scratch/joweb106/rna_velocity/data/52_NGS_EPDC_aggr/outs/filtered_feature_bc_matrix/barcodes.tsv.gz
2019-12-14 01:22:41,960 - DEBUG - Example of barcode: AAACCTGAGACAGAGA and cell_id: 52_NGS_EPDC_aggr:AAACCTGAGACAGAGA-1
2019-12-14 01:22:41,973 - DEBUG - Peeking into /gpfs/scratch/joweb106/rna_velocity/data/52_NGS_EPDC_aggr/outs/possorted_genome_bam.bam
[E::hts_open_format] Failed to open file /gpfs/scratch/joweb106/rna_velocity/data/52_NGS_EPDC_aggr/outs/possorted_genome_bam.bam
Traceback (most recent call last):
File "/software/velocyto/0.17.17/ivybridge/bin/velocyto", line 11, in <module>
sys.exit(cli())
File "/software/velocyto/0.17.17/ivybridge/lib/python3.6/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/software/velocyto/0.17.17/ivybridge/lib/python3.6/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/software/velocyto/0.17.17/ivybridge/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/software/velocyto/0.17.17/ivybridge/lib/python3.6/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/software/velocyto/0.17.17/ivybridge/lib/python3.6/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/software/velocyto/0.17.17/ivybridge/lib/python3.6/site-packages/velocyto/commands/run10x.py", line 115, in run10x
samtools_memory=samtools_memory, dump=dump, loom_numeric_dtype=dtype, verbose=verbose, additional_ca=additional_ca)
File "/software/velocyto/0.17.17/ivybridge/lib/python3.6/site-packages/velocyto/commands/_run.py", line 159, in _run
exincounter.peek(bamfile[0])
File "/software/velocyto/0.17.17/ivybridge/lib/python3.6/site-packages/velocyto/counter.py", line 135, in peek
fin = pysam.AlignmentFile(bamfile) # type: pysam.AlignmentFile
File "pysam/libcalignmentfile.pyx", line 741, in pysam.libcalignmentfile.AlignmentFile.__cinit__
File "pysam/libcalignmentfile.pyx", line 940, in pysam.libcalignmentfile.AlignmentFile._open
FileNotFoundError: [Errno 2] could not open alignment file `/gpfs/scratch/joweb106/rna_velocity/data/52_NGS_EPDC_aggr/outs/possorted_genome_bam.bam`: No such file or directory
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment