These are chat archives for biojs/biojs

27th
Feb 2015
rowlandm
@rowlandm
Feb 27 2015 03:54
Hello
anyone around?
Sebastian Wilzbach
@wilzbach
Feb 27 2015 03:55
jup ;-)
rowlandm
@rowlandm
Feb 27 2015 03:55
do you sleep seb?
;)
Sebastian Wilzbach
@wilzbach
Feb 27 2015 03:55
do you?
rowlandm
@rowlandm
Feb 27 2015 03:55
I'm in Australia!
It's 2pm now :)
I've actually got another question...
Sebastian Wilzbach
@wilzbach
Feb 27 2015 03:56
Sure don't ask to ask ;-)
rowlandm
@rowlandm
Feb 27 2015 03:56
I've actually got a graph that I wanted to put in biojs
and I'm just wanting to get my sniper working
so that I can start to see how the npm stuff works
Sebastian Wilzbach
@wilzbach
Feb 27 2015 03:57
what do you get as an error?
rowlandm
@rowlandm
Feb 27 2015 03:57

npm run w

biojs-vis-rohart-msc-test@0.1.0 w /home/rowlandm/biojs2/biojs-vis-rohart-msc-test
prunner "npm run sniper" "npm run watch"

sh: 1: prunner: not found

npm ERR! Linux 3.13.0-45-generic
npm ERR! argv "node" "/usr/local/bin/npm" "run" "w"
npm ERR! node v0.10.36
npm ERR! npm v2.6.0
npm ERR! code ELIFECYCLE
npm ERR! biojs-vis-rohart-msc-test@0.1.0 w: prunner "npm run sniper" "npm run watch"
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the biojs-vis-rohart-msc-test@0.1.0 w script 'prunner "npm run sniper" "npm run watch"'.
npm ERR! This is most likely a problem with the biojs-vis-rohart-msc-test package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! prunner "npm run sniper" "npm run watch"
npm ERR! You can get their info via:
npm ERR! npm owner ls biojs-vis-rohart-msc-test
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/rowlandm/biojs2/biojs-vis-rohart-msc-test/npm-debug.log
rowlandm@rowlandm-Latitude-E6230:~/biojs2/biojs-vis-rohart-msc-test$

with my defaults of slush biojs being:
? A visualization lib? Yes
? Unit tests: No
? Add a example css file? No
? Configure a build system? (Gulp) (y/N) y
Sebastian Wilzbach
@wilzbach
Feb 27 2015 03:58
you did run slush to create the package.json?
rowlandm
@rowlandm
Feb 27 2015 03:58
yeah
ran slush biojs
so I haven't touched anything else
Sebastian Wilzbach
@wilzbach
Feb 27 2015 03:59
Okay the error is simple "sh: 1: prunner: not found"
rowlandm
@rowlandm
Feb 27 2015 03:59
not sure if I missed a npm package
Sebastian Wilzbach
@wilzbach
Feb 27 2015 03:59
prunner is just a simple tool that runs two commands in one shell and merges the output
rowlandm
@rowlandm
Feb 27 2015 03:59
yeah - sorry - should have seen that
Sebastian Wilzbach
@wilzbach
Feb 27 2015 03:59
normally the slush tool should install it as dependency
so there are mutliple ways to fix it
rowlandm
@rowlandm
Feb 27 2015 04:00
I did have some problems with my npm before
Sebastian Wilzbach
@wilzbach
Feb 27 2015 04:00
  1. directly run sniper
(either with npm run sniper or sniper)
2) install prunner
do you mind to paste the dependency section of your package.json?
rowlandm
@rowlandm
Feb 27 2015 04:01
"devDependencies": {
"mkdirp": "^0.5.0",
"browserify": "6.x",
"sniper": "0.x",
"watchify": "^1.0.6",
"prunner": "1.x"
},
Sebastian Wilzbach
@wilzbach
Feb 27 2015 04:01
does npm run sniper work for you?
rowlandm
@rowlandm
Feb 27 2015 04:02
yes
npm run w also works now - I just installed prunner
but I think it's erroring out when trying to build things
Sebastian Wilzbach
@wilzbach
Feb 27 2015 04:02
great - it is weird that prunner is not installed by slush
rowlandm
@rowlandm
Feb 27 2015 04:02
sorry - I'm a newbie at this
Sebastian Wilzbach
@wilzbach
Feb 27 2015 04:03
  • not installed = not downloaded
no worries
rowlandm
@rowlandm
Feb 27 2015 04:03
I'm running npm run w and getting:

npm-run-watch: > biojs-vis-rohart-msc-test@0.1.0 watch /home/rowlandm/biojs2/biojs-vis-rohart-msc-test
npm-run-watch: > watchify -r ./:biojs-vis-rohart-msc-test -v -o build/test.js
[npm-run-sniper]: > biojs-vis-rohart-msc-test@0.1.0 sniper /home/rowlandm/biojs2/biojs-vis-rohart-msc-test
[npm-run-sniper]: > sniper .

npm-run-watch: throw er; // Unhandled 'error' event

npm-run-watch: Error: ENOENT, open 'build/.test.js'
[npm-run-sniper]: running: http://localhost:9090

by the way, this is the default files from: slush biojs
Sebastian Wilzbach
@wilzbach
Feb 27 2015 04:03
do you by chance use windows?
rowlandm
@rowlandm
Feb 27 2015 04:04
no - using Ubuntu linux
Sebastian Wilzbach
@wilzbach
Feb 27 2015 04:04
damn - could have been an error source :(
rowlandm
@rowlandm
Feb 27 2015 04:04
14.04 LTS
Sebastian Wilzbach
@wilzbach
Feb 27 2015 04:04
Did slush create an empty build folder for you?
rowlandm
@rowlandm
Feb 27 2015 04:05
no
drwxr-xr-x 4 rowlandm rowlandm 4.0K Feb 27 14:02 .
drwxrwxr-x 4 rowlandm rowlandm 4.0K Feb 27 13:49 ..
drwxr-xr-x 2 rowlandm rowlandm 4.0K Feb 27 13:54 examples
-rw-r--r-- 1 rowlandm rowlandm 89 Feb 27 13:51 .gitignore
drwxr-xr-x 2 rowlandm rowlandm 4.0K Feb 27 13:54 lib
-rw-r--r-- 1 rowlandm rowlandm 11K Feb 27 13:51 LICENSE
-rw-rw-r-- 1 rowlandm rowlandm 2.0K Feb 27 14:02 npm-debug.log
-rw-r--r-- 1 rowlandm rowlandm 92 Feb 27 13:51 .npmignore
-rw-r--r-- 1 rowlandm rowlandm 1.4K Feb 27 13:51 package.json
-rw-r--r-- 1 rowlandm rowlandm 1.5K Feb 27 13:51 README.md
-rw-r--r-- 1 rowlandm rowlandm 36 Feb 27 13:51 .travis.yml
Sebastian Wilzbach
@wilzbach
Feb 27 2015 04:05
That is the error why npm run w doesn't work
rowlandm
@rowlandm
Feb 27 2015 04:05
OK
Sebastian Wilzbach
@wilzbach
Feb 27 2015 04:05
Ehm what version of slush do you use?
slush biojs -v
rowlandm
@rowlandm
Feb 27 2015 04:06
[slush] 1.1.1
[14:06:05] 3.8.11
[slush-biojs] 0.7.10
Sebastian Wilzbach
@wilzbach
Feb 27 2015 04:06
okay that is the latest ;-)
rowlandm
@rowlandm
Feb 27 2015 04:06
whew!
so if I start from scratch
and go: npm run w
should I be able to go to the localhost:9000/examples/simple
Sebastian Wilzbach
@wilzbach
Feb 27 2015 04:07
no just run mkdir build
rowlandm
@rowlandm
Feb 27 2015 04:07
and get a working example?
Sebastian Wilzbach
@wilzbach
Feb 27 2015 04:07
yes
rowlandm
@rowlandm
Feb 27 2015 04:07
ok
that worked
Thanks!
Sebastian Wilzbach
@wilzbach
Feb 27 2015 04:08
Great :)
rowlandm
@rowlandm
Feb 27 2015 04:08
let me try it on another folder
Sebastian Wilzbach
@wilzbach
Feb 27 2015 04:08
I will have a look why biojs-slush didn't create the build folder and installed prunner
Sniper only works with npm packages
rowlandm
@rowlandm
Feb 27 2015 04:09
Maybe it's when I didn't choose
? Configure a build system? (Gulp) (y/N) y
Sebastian Wilzbach
@wilzbach
Feb 27 2015 04:10
Oh yes - that is probably the cause
rowlandm
@rowlandm
Feb 27 2015 04:10
just let me test it again
rowlandm@rowlandm-Latitude-E6230:~$ rm -fR testbiojs;mkdir testbiojs;cd testbiojs;slush biojs
[slush] Using slushfile /usr/lib/node_modules/slush-biojs/slushfile.js
[14:10:54] Starting 'biojs:default'...
? Module name? (required) testbiojs
? Description? a
? Module version? 0.1.0
? Author name? rowlandm
? Author email? a
? Github username? rowlandm
? Keywords for npm (separate with comma)
? A visualization lib? Yes
? Unit tests: No
? Add a example css file? No
? Configure a build system? (Gulp) Yes
? Linting (Check code style with JSHint) No
? Choose your license type: (Use arrow keys)
rowlandm@rowlandm-Latitude-E6230:~/testbiojs$ ls -alh
total 180K
drwxr-xr-x 4 rowlandm rowlandm 4.0K Feb 27 14:11 .
drwxr-xr-x 84 rowlandm rowlandm 12K Feb 27 14:10 ..
drwxr-xr-x 2 rowlandm rowlandm 4.0K Feb 27 14:11 examples
-rw-r--r-- 1 rowlandm rowlandm 89 Feb 27 14:11 .gitignore
-rw-r--r-- 1 rowlandm rowlandm 3.4K Feb 27 14:11 gulpfile.js
drwxr-xr-x 2 rowlandm rowlandm 4.0K Feb 27 14:11 lib
-rw-r--r-- 1 rowlandm rowlandm 11K Feb 27 14:11 LICENSE
-rw-rw-r-- 1 rowlandm rowlandm 119K Feb 27 14:11 npm-debug.log
-rw-r--r-- 1 rowlandm rowlandm 92 Feb 27 14:11 .npmignore
-rw-r--r-- 1 rowlandm rowlandm 1.4K Feb 27 14:11 package.json
-rw-r--r-- 1 rowlandm rowlandm 1.4K Feb 27 14:11 README.md
-rw-r--r-- 1 rowlandm rowlandm 36 Feb 27 14:11 .travis.yml
so it didn't seem to create the build dir even when I selected gulp yes
Sebastian Wilzbach
@wilzbach
Feb 27 2015 04:12
but you did select gulp the last time too, right?
rowlandm
@rowlandm
Feb 27 2015 04:12
yeah
Surely it's something in my environment though...
I get a lot of:
npm ERR! Attempt to unlock /home/rowlandm/testbiojs/node_modules/browserify, which hasn't been locked
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! http://github.com/npm/npm/issues
npm WARN locking Error: EACCES, open '/home/rowlandm/.npm/_locks/vinyl-source-stream-2929db550b8e00f3.lock'
npm WARN locking /home/rowlandm/.npm/_locks/vinyl-source-stream-2929db550b8e00f3.lock failed { [Error: EACCES, open '/home/rowlandm/.npm/_locks/vinyl-source-stream-2929db550b8e00f3.lock']
npm WARN locking errno: 3,
npm WARN locking code: 'EACCES',
npm WARN locking path: '/home/rowlandm/.npm/_locks/vinyl-source-stream-2929db550b8e00f3.lock' }
npm ERR! Linux 3.13.0-45-generic
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.10.36
npm ERR! npm v2.6.0
Sebastian Wilzbach
@wilzbach
Feb 27 2015 04:13
Well it could be that your npm installation is a bit outdated and the postinstall hook is not triggered, but I rather guess that it is something weird with the gulpfile
rowlandm
@rowlandm
Feb 27 2015 04:13
errors when I select different options in slush biojs
Sebastian Wilzbach
@wilzbach
Feb 27 2015 04:14
We kind of deprecated the gulp build script, because it was too hard to maintain for newbies ;-)
rowlandm
@rowlandm
Feb 27 2015 04:14
well it looks to have worked for what I wanted - I'll just keep in mind to ensure that build folder is there
Yeah - I can imagine that
It's a big learning curve for newbies
Sebastian Wilzbach
@wilzbach
Feb 27 2015 04:15
Yes that is why we removed it as default option and I probably should remove it entirely from slush
Oh god I just saw that the bootstrapping guide recommends to use gulp :(
rowlandm
@rowlandm
Feb 27 2015 04:17
yeah
Sebastian Wilzbach
@wilzbach
Feb 27 2015 04:17
As you have spotted that - do you want to replace it?
rowlandm
@rowlandm
Feb 27 2015 04:18
How do I do that?
Sebastian Wilzbach
@wilzbach
Feb 27 2015 04:18
Just click on "Improve this page" on the top ;-)
rowlandm
@rowlandm
Feb 27 2015 04:19
So should we remove "configure a build system"
I could put in some comments like "Ensure prunner is working if you get x error"
Sebastian Wilzbach
@wilzbach
Feb 27 2015 04:19
Yes the default option is "No"

I could put in some comments like "Ensure prunner is working if you get x error"

You can do that, but I will dig into anyways

rowlandm
@rowlandm
Feb 27 2015 04:21
did you get my pull request?
Sebastian Wilzbach
@wilzbach
Feb 27 2015 04:23
Yes I already merged it (as you can see on the right). Thanks a lot for letting us know about this weird behavior
rowlandm
@rowlandm
Feb 27 2015 04:24
no worries
I'll make some other suggestions to the doco
Sebastian Wilzbach
@wilzbach
Feb 27 2015 04:24
(: highly appreciated!
Sebastian Wilzbach
@wilzbach
Feb 27 2015 05:23
@rowlandm: Both of us were working on the bootstrapping document - I hope I didn't miss anything from your commit. I rephrased the notice about the prunner bug and made it more generic
rowlandm
@rowlandm
Feb 27 2015 05:25
ok - will have a look
I moved the following up to "bootstrap your own project"

For BioJS 2 components, we have following naming recommendations:

biojs-[io/rest/vis/algo/…]-[name]

Use io for components which are responsible for parsing data into a specific format (aka parser)
Use vis for components which are visualizing data sets
Use rest for REST apis to databases
Use algo for server/client side algorithms processing the data (e.g. alignments, neural networks, markov models, graph algorithms)
If you have a better name for your package, please use it. This naming guideline is only if you are not that creative (like us).

Sebastian Wilzbach
@wilzbach
Feb 27 2015 05:27
It takes 2 minutes for the edu pages to update
rowlandm
@rowlandm
Feb 27 2015 05:27
oh right
Sebastian Wilzbach
@wilzbach
Feb 27 2015 05:28
(It is now published)
I moved the naming recomm. as you did to 1.3)
rowlandm
@rowlandm
Feb 27 2015 05:31
I'm not sure if it's fully refreshed, but I would probably move it to just after the title in 1.2
that way people can setup their directory with the naming convention as soon as possible
Okay sorry my mistake
rowlandm
@rowlandm
Feb 27 2015 05:32
I just made the changes and did a pull request
I also went though the tutorial again
the bootstrap from scratch
and tried npm test
got errors:

rowlandm@rowlandm-Latitude-E6230:/tmp/testbiojs$ npm test

testbiojs@0.1.0 test /tmp/testbiojs
mocha

sh: 1: mocha: not found
npm ERR! Test failed. See above for more details.

That's following the new instructions on the bootstrapping tutorial
I'd suggest that you want to give newbies a good feeling and have that test pass on the first attempt
Just to let them know that they are on the right track
Sebastian Wilzbach
@wilzbach
Feb 27 2015 05:34
The error you were experiencing before and this are nearly the same
rowlandm
@rowlandm
Feb 27 2015 05:35
I just noticed that there is no build dir
sorry - I'm not paying attention
lol
sorry Seb
Sebastian Wilzbach
@wilzbach
Feb 27 2015 05:35
I guess somehow not all node dependencies are downloaded
However I cant tell why
rowlandm
@rowlandm
Feb 27 2015 05:36
fixed error with mocha
Sebastian Wilzbach
@wilzbach
Feb 27 2015 05:36

I just made the changes and did a pull request

thanks - do you want to have write access?

rowlandm
@rowlandm
Feb 27 2015 05:36
That's OK - I'd like you to check it before we push it up.
Plus I can't see what my changes look like til it goes up on the site
Ayush Sharma
@ayusharma
Feb 27 2015 05:37
Hi on "npm test" I am getting this error "Cannot find module 'watchify'"
rowlandm
@rowlandm
Feb 27 2015 05:37

rowlandm@rowlandm-Latitude-E6230:/tmp/testbiojs$ npm test

testbiojs@0.1.0 test /tmp/testbiojs
mocha

module.js:340
throw err;
^
Error: Cannot find module 'chai'

I'm getting something similar too ayusharma
Sebastian Wilzbach
@wilzbach
Feb 27 2015 05:37

fixed error with mocha

the "fix" should not be npm install -g mocha :P

rowlandm
@rowlandm
Feb 27 2015 05:37
oh :/
whoops :)
Sebastian Wilzbach
@wilzbach
Feb 27 2015 05:38
can you ls your node_modules folder?
rowlandm
@rowlandm
Feb 27 2015 05:38
where is that on linux?
Sebastian Wilzbach
@wilzbach
Feb 27 2015 05:38
ls node_modules
Ayush Sharma
@ayusharma
Feb 27 2015 05:39
on linux ububtu 14.04 LTS
rowlandm
@rowlandm
Feb 27 2015 05:39
rowlandm@rowlandm-Latitude-E6230:/usr/local/lib/node_modules$ ls
npm slush slush-biojs
Ayusharma - it should be on /usr/local/lib/node_modules
rowlandm@rowlandm-Latitude-E6230:/usr/local/lib/node_modules$ ls
npm slush slush-biojs
rowlandm@rowlandm-Latitude-E6230:/usr/local/lib/node_modules$ ll
total 20
drwxr-xr-x 5 nobody rowlandm 4096 Feb 27 09:42 ./
drwxr-xr-x 7 root root 4096 Feb 27 09:41 ../
drwxr-xr-x 10 nobody rowlandm 4096 Feb 27 09:42 npm/
drwxr-xr-x 5 nobody rowlandm 4096 Feb 27 09:41 slush/
drwxr-xr-x 4 nobody rowlandm 4096 Feb 27 09:41 slush-biojs/
Ayush Sharma
@ayusharma
Feb 27 2015 05:40
@rowlandm thanks.. I am checking it..
Sebastian Wilzbach
@wilzbach
Feb 27 2015 05:41

linux ububtu 14.04 LTS

You both use ubuntu LTS? BTW I tested this so often on my Arch, there everything works perfectly normal

rowlandm
@rowlandm
Feb 27 2015 05:42
yup apparently so
ayusharma - have you upgraded your npm via
Sebastian Wilzbach
@wilzbach
Feb 27 2015 05:43
The reason for you error is that somehow the npm install command is not executed entirely
rowlandm
@rowlandm
Feb 27 2015 05:43
curl -sL https://deb.nodesource.com/setup | sudo bash - 
sudo apt-get install -y nodejs
Sebastian Wilzbach
@wilzbach
Feb 27 2015 05:43
npm install downloads all dependencies listed in the package.json into the node_modules folder
that is why a fix should be rm -r node_modules && npm install
Ayush Sharma
@ayusharma
Feb 27 2015 05:44
I have not updated.. I am updating now.. Okay.. I will try this @greenify
Sebastian Wilzbach
@wilzbach
Feb 27 2015 05:45
I will also try on an ubuntu machine
Yup works there too, btw our online service try.biojs.net uses also ubuntu and there slush works correctly too ...
rowlandm
@rowlandm
Feb 27 2015 05:53
greenify - did you mean the /usr/local/lib/node_modules?
I just ran that and all it did was give me errors
Sebastian Wilzbach
@wilzbach
Feb 27 2015 05:53
ah no
in your package
rowlandm
@rowlandm
Feb 27 2015 05:54
all my packages are general with a -g
oh dear
Sebastian Wilzbach
@wilzbach
Feb 27 2015 05:54
Yes that is your way to "fix" your problem

did you mean the /usr/local/lib/node_modules?

This could be catastophic. Did you run that with sudo??

rowlandm
@rowlandm
Feb 27 2015 05:55
yup . whoops
Sebastian Wilzbach
@wilzbach
Feb 27 2015 05:55
You probably have to reinstall the npm package^^
rowlandm
@rowlandm
Feb 27 2015 05:56
yeah. I'll have to do a bit of work
Sebastian Wilzbach
@wilzbach
Feb 27 2015 05:58
I am sorry :(
rowlandm
@rowlandm
Feb 27 2015 05:58
lol
It's ok
I shouldn't delete files with sudo :)
I need you to answer d3 questions for me afterwards anyway!
if you are still awake ;)
Sebastian Wilzbach
@wilzbach
Feb 27 2015 05:59
I will probably go to bed soon ..
Can u also ask now?
rowlandm
@rowlandm
Feb 27 2015 06:00
I wanted to know how I could save d3 data into my examples
so that I could refer to it in my d3 graph
I couldn't find an example
Sebastian Wilzbach
@wilzbach
Feb 27 2015 06:00
So how to load a file from disk?
rowlandm
@rowlandm
Feb 27 2015 06:00
that might work
but I'm used to using:
data_url= 'http://localhost:9000/msc_signature/get_msc_signature_values?ds_id=6037';
d3.tsv(data_url,function (error,data){
Sebastian Wilzbach
@wilzbach
Feb 27 2015 06:01
okay I see. Well we have some general code patterns
Ayush Sharma
@ayusharma
Feb 27 2015 06:01

I just went into node_modules directory in my repo/package and put this command npm install watchify

It solved my problem...

rowlandm
@rowlandm
Feb 27 2015 06:02
sweet
Sebastian Wilzbach
@wilzbach
Feb 27 2015 06:02
but basically you can drop your tsvanywhere in your installation. The only thing you shold be aware of is to use a leading dot
rowlandm
@rowlandm
Feb 27 2015 06:02
?
Sebastian Wilzbach
@wilzbach
Feb 27 2015 06:02
leading dot or slash
rowlandm
@rowlandm
Feb 27 2015 06:03
as in ./myfile.tsv
?
Sebastian Wilzbach
@wilzbach
Feb 27 2015 06:03
yup
rowlandm
@rowlandm
Feb 27 2015 06:03
ok
will give it a shot
Sebastian Wilzbach
@wilzbach
Feb 27 2015 06:03
@davidao complained once that sniper doesn't list all files in the examples dir, but afaik this is fixed now
@ayusharma: I still think that sth. is weird with your Ubuntu installation or Ubuntu LTS... normally all deps should be downloaded automatically
rowlandm
@rowlandm
Feb 27 2015 06:07
curl -L http://npmjs.org/install.sh | sudo sh
this fixed my problem
Sebastian Wilzbach
@wilzbach
Feb 27 2015 06:28

complained once that sniper doesn't list all files in the examples dir

I just checked - this is fixed now ;-)

tyreek
@tyreek
Feb 27 2015 06:29
(biojs-registry via irc) BioJS package update: sniper to 0.2.16 by greenify
Ayush Sharma
@ayusharma
Feb 27 2015 06:34
@greenify I will re-install ubuntu to set all things working..
rowlandm
@rowlandm
Feb 27 2015 06:35
@greenify - I got part of the way with the tsv, but I think it gets changed somewhere
I put it in the examples directory
is that a problem?
yep that did the trick
thanks Seb!
Sebastian Wilzbach
@wilzbach
Feb 27 2015 06:41
@ayusharma: No need to install Ubuntu again. I guess your npm version is just a bit outdated?
Ayush Sharma
@ayusharma
Feb 27 2015 06:42
@greenify .. first I will update node and npm .. thanks.. :)
Sebastian Wilzbach
@wilzbach
Feb 27 2015 06:42
What does npm -v show?
Ayush Sharma
@ayusharma
Feb 27 2015 06:42
1.4.28
Sebastian Wilzbach
@wilzbach
Feb 27 2015 06:43
There you go, a lot was changed in the version 2
Ayush Sharma
@ayusharma
Feb 27 2015 06:43
I'm updating it...
Sebastian Wilzbach
@wilzbach
Feb 27 2015 06:45
(: let me know if you still have troubles afterwards
rowlandm
@rowlandm
Feb 27 2015 06:45
@greenify - more doco updates for you
Sebastian Wilzbach
@wilzbach
Feb 27 2015 06:45
Did you follow our tutorial to install node & npm? (then we should probably update that)
Ayush Sharma
@ayusharma
Feb 27 2015 06:47
I have already installed npm and nodejs so I skipped that section.. but now everything is working.. my npm -v is 2.6.0
thanks a lot..:)
Sebastian Wilzbach
@wilzbach
Feb 27 2015 06:51

more doco updates for you

Ehm as a guideline I would recommend to put the data into a different folder and I would remove the code inside your d3.tsv function

rowlandm
@rowlandm
Feb 27 2015 06:54
easy to put it into a different folder
which code did you mean by the d3.tsv
all of it?
Sebastian Wilzbach
@wilzbach
Feb 27 2015 06:54
yes everything inside
the prediction counter is very specific
rowlandm
@rowlandm
Feb 27 2015 06:55
prediction counter?
Sebastian Wilzbach
@wilzbach
Feb 27 2015 06:55
        count = 0;
        data.forEach(function(d){
            // ths + on the front converts it into a number just in case
            d.lwr = +d.lwr;
            d.prediction = +d.prediction;
            d.upr = +d.upr;
            count++;

        });
rowlandm
@rowlandm
Feb 27 2015 06:56
I know this isn't a very useful graph a the moment
as it's so specific
but I wanted to get it into a biojs module so that we could reference biojs in the paper
as an aside, how do I reference biojs?
Is there a citation?
Sebastian Wilzbach
@wilzbach
Feb 27 2015 07:04
@rowlandm: merged :) , but I modified it biojs/edu@f27d8a9
rowlandm
@rowlandm
Feb 27 2015 07:05
that's cool!
I want to try and do a d3 graph from scratch
a tutorial
Sebastian Wilzbach
@wilzbach
Feb 27 2015 07:06

as an aside, how do I reference biojs?

Seems to be an open issue biojs/biojs#145

rowlandm
@rowlandm
Feb 27 2015 07:06
I might just use the outdated citation
as long as they redirect the website
Sebastian Wilzbach
@wilzbach
Feb 27 2015 07:07
It is about the EBI registry
I just saw that there is a more recent publication, but this about the EBI registry too
rowlandm
@rowlandm
Feb 27 2015 07:08
So does the EBI control the EBI registry?
Sebastian Wilzbach
@wilzbach
Feb 27 2015 07:08

how do I reference biojs?

My long term idea is that every package can add its own pubmedids for published paper about the specific component and when then just generate the citation string

rowlandm
@rowlandm
Feb 27 2015 07:09
OK
well thanks for all the help
I''m going to head off now
Sebastian Wilzbach
@wilzbach
Feb 27 2015 07:10

So does the EBI control the EBI registry?

Yes and no. The EBI registry is the previous approach that was taken in past

rowlandm
@rowlandm
Feb 27 2015 07:11
And you want to redirect that
to the new stuff
greenify
@greenify - would it be possible to split up the initial scripts so that if a person like me wanted to kick off a d3 graph everything would be ready?
eg. slush biojs-vis
Sebastian Wilzbach
@wilzbach
Feb 27 2015 07:13

And you want to redirect that

Lol yes the EBI has an excellent PageRank, but as I told you I can't. I have - as everyone else - only access to the public resources on (like biojs.net, edu.biojs.net or biojs.io)

rowlandm
@rowlandm
Feb 27 2015 07:13
yeah I remember
Sebastian Wilzbach
@wilzbach
Feb 27 2015 07:14

would it be possible to split up the initial scripts so that if a person like me wanted to kick off a d3 graph everything would be ready?

Sure, here is the slush code used for our biojs slush tool

rowlandm
@rowlandm
Feb 27 2015 07:15
would it be better to keep it all in one place or separate it into another slush tool?
Sebastian Wilzbach
@wilzbach
Feb 27 2015 07:16
Basically slush just prefills the template fills, so you could add custom modifications there
Hmm so just want to add d3 as dependency and a dummy file?
rowlandm
@rowlandm
Feb 27 2015 07:17
yeah.
And show up a very basic graph of some sort to prove that it's working
once you run up sniper
Sebastian Wilzbach
@wilzbach
Feb 27 2015 07:19
Isn't hello world enough :P?
rowlandm
@rowlandm
Feb 27 2015 07:19
I'd like to test it on my mate who writes d3 things
Because I think the way you guys have done it, people should be developing in biojs first
I did it the other way round
Sebastian Wilzbach
@wilzbach
Feb 27 2015 07:20
Well the thing is that I want to keep slush as minimal as possible, but we could add a new question to ask whether slush should load a default example
rowlandm
@rowlandm
Feb 27 2015 07:20
Sure
I think it would be a minimal d3 example
because d3 is the standard now
Sebastian Wilzbach
@wilzbach
Feb 27 2015 07:21
The most elegant way would be to require slush-biojs and build on top of it
rowlandm
@rowlandm
Feb 27 2015 07:22
yeah cool
but maybe I will get the chance soon
Sebastian Wilzbach
@wilzbach
Feb 27 2015 07:22

d3 is the standard now

Well there are still normal people out there (like myself) who prefer not to use d3

rowlandm
@rowlandm
Feb 27 2015 07:22
I won't be able to do that this month
I see
why don't you prefer d3?
Sebastian Wilzbach
@wilzbach
Feb 27 2015 07:24
I will give definitely think about it and next time you ping me about this we can agree whether option (a) question, (b) fork, (c) require
rowlandm
@rowlandm
Feb 27 2015 07:24
sure thing
My idea is to do a d3 tutorial, but having that as a slush would be way easier
Thanks for the help Seb
I gotta go
see you
Sebastian Wilzbach
@wilzbach
Feb 27 2015 07:27

why don't you prefer d3?

Wow that is a long topic, but tl;dr: It is nice to create quick & dirty stuff, but it doesn't solve everything.

tyreek
@tyreek
Feb 27 2015 09:22
(biojs-registry via irc) BioJS got a new package: biojs-vis-interactions-heatmap-d3
tyreek
@tyreek
Feb 27 2015 10:19
(biojs-registry via irc) BioJS package update: biojs-vis-interactions-heatmap-d3 to 0.1.7 by 4ndr01d3
rowlandm
@rowlandm
Feb 27 2015 10:53
That would be an interesting conversation indeed
tyreek
@tyreek
Feb 27 2015 11:28
(biojs-registry via irc) BioJS package update: biojs-vis-interactions-heatmap-d3 to 0.1.8 by 4ndr01d3
(biojs-registry via irc) BioJS package update: biojs-vis-interactions-heatmap-d3 to 0.1.9 by 4ndr01d3
tyreek
@tyreek
Feb 27 2015 12:47
(biojs-registry via irc) BioJS package update: biojs-vis-interactions-heatmap-d3 to 0.1.10 by 4ndr01d3
tyreek
@tyreek
Feb 27 2015 13:43
(biojs-registry via irc) BioJS package update: tnt.tooltip to 0.0.7 by Miguel Pignatelli
Ayush Sharma
@ayusharma
Feb 27 2015 15:20
@greenify HI, I am going through this tutorial.. and I have completed the task given in this tutorial.. my logic is different and getting the desired output.. so how to perform the npm test..
Sebastian Wilzbach
@wilzbach
Feb 27 2015 15:37
@ayusharma: Yes there are reasons why we want to deprecate the snipspector tutorial. It is based on a template directory
var assert = require("chai").assert;
var tutorial = require("../");

// you can find more docu about mocha here
// https://visionmedia.github.io/mocha/

describe('Snipspector', function(){
  // do any init stuff here
  beforeEach(function(){
    snipspector = tutorial.parse;
  });
  describe('parse', function(){
    it('should return match with default object', function(){
      dummyObj = [{name: "20", homo: 2, hetero: 1, del: 0},
                  {name: "21", homo: 1, hetero: 1, del: 1}, 
                  {name: "22", homo: 1, hetero: 1, del: 0 }];
      assert.deepEqual(snipspector(), dummyObj);
    });
  });
});
Copy this to a new file to the test folder.
The original template for the snipspector tutorial is here
Ayush Sharma
@ayusharma
Feb 27 2015 15:40
@greenify thanks.. I will follow your reply..:)
@greenify it worked.. I have passed the test..
Sebastian Wilzbach
@wilzbach
Feb 27 2015 15:42
amazing :)
Do you want to add the test to the tutorial? (as long as we still have the snipspector tutorial more people might be confused)
Ayush Sharma
@ayusharma
Feb 27 2015 15:44
yes..
so how can I do this ?
Sebastian Wilzbach
@wilzbach
Feb 27 2015 15:45
Just click on "Improve this page" on the top
This will take you to github where you can make a pull request to the markdown file
Ayush Sharma
@ayusharma
Feb 27 2015 15:46
okay.. I am doing this... :) thanks..
Ayush Sharma
@ayusharma
Feb 27 2015 16:07
@greenify I have sent you a PR.. Let me know is this correct or not ? Thanks for providing me a contribution opportunity ..
Sebastian Wilzbach
@wilzbach
Feb 27 2015 16:19
@ayusharma: Thanks :)
Ayush Sharma
@ayusharma
Feb 27 2015 16:20
@greenify :)
Ayush Sharma
@ayusharma
Feb 27 2015 17:44
@greenify I have a doubt.. How can I use the io package which I have made here http://edu.biojs.net/snipspector/basics/ in next visualization basic section ??
Sebastian Wilzbach
@wilzbach
Feb 27 2015 17:48
like this
Ayush Sharma
@ayusharma
Feb 27 2015 17:57

@greenify can I give the path of my local package in

var parser = require("<local path of biojs-io-snipspector package which I made in package section");

??

Sebastian Wilzbach
@wilzbach
Feb 27 2015 18:06
Yes but you can also type require("biojs-io-snipspector"), but then you would have to install it npm install biojs-io-snipspector
Ayush Sharma
@ayusharma
Feb 27 2015 18:08
@greenify I have done this.. I want to know that can I use that biojs-io-snipspector package from my local folder... ?
Prasun Anand
@prasunanand
Feb 27 2015 18:13
yes, require('relative path')
Sebastian Wilzbach
@wilzbach
Feb 27 2015 18:13
Yes you can use a relative path ".. /path"
Prasun Anand
@prasunanand
Feb 27 2015 18:13
:D
Ayush Sharma
@ayusharma
Feb 27 2015 18:14
@prasunanand @greenify thanks :)
Ayush Sharma
@ayusharma
Feb 27 2015 21:49

@greenify after creating visualization with canvas and svg I am going through D3 visualization http://edu.biojs.net/snipspector_adv/vis_d3/

I have two doubts here..

  1. According two tutorial we have to make a d3.js snippets in package.json but in source code repo there is no d3.js snippets .
    https://github.com/biojs-edu/biojs-vis-snipspector/blob/master/package.json
    So can I add d3 snippets to the package.json in source code repo or make a PR ??

  2. on executing the tutorial in the end I am getting error "d3 is not defined" but I have added the d3 snippets in package.json. How to solve it ?