Skip to content

Commit

Permalink
Merge pull request #254 from YeoLab/fix_docs
Browse files Browse the repository at this point in the history
Fix docs
  • Loading branch information
olgabot committed Feb 4, 2015
2 parents 02966de + 69ca38c commit 65aad23
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ install:
before_script:
- git config --global user.email "olga.botvinnik@gmail.com"
- git config --global user.name "olgabot"
- git config --global push.default simple
- export REPO_URL_GITHUB="https://$GH_TOKEN@github.com/$GH_REPO.git"
- . ./.travis/setup.sh # make any change needed for setup.sh
- echo $DEPLOY_HTML_DIR
Expand All @@ -47,7 +48,6 @@ after_script:
- sudo apt-get install pandoc
- pip install sphinx numpydoc sphinx_bootstrap_theme runipy
- sudo pip install -r doc/requirements.txt --use-mirrors
- RELEASE=release
- MASTER=master
- if [[ $TRAVIS_BRANCH == "v*.*.*" ]] ; then export DEPLOY_HTML_DIR=docs ; fi
- if [[ $TRAVIS_BRANCH == "$MASTER" ]] ; then export DEPLOY_HTML_DIR=docs-dev ; fi
Expand Down
4 changes: 2 additions & 2 deletions examples/plot_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"""
import flotilla
study = flotilla.embark(flotilla._shalek2013)
study.plot_classifier('phenotype: Immature BDMC')
study = flotilla.embark(flotilla._brainspan)
study.plot_classifier('structure_name: cerebellar cortex')
2 changes: 2 additions & 0 deletions flotilla/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
# 250 cells, ensembl and miso ids on index, need renaming, lots of celltypes
_test_data = 'https://raw.githubusercontent.com/YeoLab/flotilla_test_data/' \
'master/datapackage.json'
_brainspan = 'https://s3-us-west-2.amazonaws.com/flotilla/' \
'brainspan_batch_corrected_for_amazon_s3/datapackage.json'


def embark(study_name, load_species_data=True):
Expand Down
2 changes: 1 addition & 1 deletion flotilla/data_model/study.py
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,7 @@ def plot_classifier(self, trait, sample_subset=None,
try:
trait_data = self.metadata.data[trait]
except KeyError:
trait_ids = self.sample_subset_to_sample_ids(sample_subset)
trait_ids = self.sample_subset_to_sample_ids(trait)
trait_data = self.metadata.data.index.isin(trait_ids)

all_true = np.all(trait_data)
Expand Down
2 changes: 1 addition & 1 deletion flotilla/visualize/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def draw_graph(self,
try:
feature_id = self.DataModel.maybe_renamed_to_feature_id(
feature_of_interest)[0]
except (ValueError, KeyError):
except (ValueError, KeyError, IndexError):
feature_id = ''

if featurewise:
Expand Down
4 changes: 1 addition & 3 deletions flotilla/visualize/predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ def do_pca(self, **plotting_kwargs):
assert self.has_been_fit
assert self.has_been_scored

ax = plt.gca() if 'ax' not in plotting_kwargs \
else plotting_kwargs['ax']
# del plotting_kwargs['ax']
ax = plotting_kwargs.pop('ax', plt.gca())
local_plotting_kwargs = self._reducer_plotting_args
local_plotting_kwargs.update(plotting_kwargs)
pca = self.pca()
Expand Down

0 comments on commit 65aad23

Please sign in to comment.