Comments (1)
Sample code for usage of the class, from the programmer's perspective. Can be used in the console.
- Creating it
# Properties of the file, to adjust
dp_id = 23; name = "virtcivet"; user_id = 1; group_id = 1;
co_ids = [23,45] # ID of some CivetOutputs
# Create it
uf = CivetVirtualCollection.new(:name => name, :dp_id => dp_id, :user_id => user_id, :group_id => group_id) # hope I got them all
uf.save!
# Set content
uf.cache_prepare
path = uf.cache_full_path
File.mkdir(path.to_s)
uf.set_civet_outputs(CivetOutput.find(co_id), current_user) # need current_user for validation
uf.sync_to_provider
- Use an existing CivetVirtualStudy, from any Remote Resource
# Prep; adjust in console
cs_id = 234; # id of the study
# Find it
cs = CivetVirtualStudy.find(cs_id)
cs.sync_to_cache
cos = cs.get_civetoutputs(current_user) # returns array of CivetOutput objects
# Do something with content of each CivetOutput
path = cs.cache_full_path
Dir.chdir(path.to_s) do
cos.map(&:name).each do |co_name|
system("ls -ld #{co_name.bash_escape};du -D -h #{co_name.bash_escape}")
end
end
The current_user
is needed in some methods to be passed to validation code of CbrainFileList methods.
from cbrain-plugins-neuro.
Related Issues (20)
- BEst Spark taging HOT 2
- CIVET-Macaque and CIVET files selection restriction.
- Failed to open *.nii.gz files. HOT 1
- Improve parameters summary (CIVET)
- CIVET macaque save result after recover
- Add brainstem processing in ReconAll HOT 4
- Editing the params of a FMRIPrepSingleSubject erases the link with the existing output
- oxford asl 6 : fix_bolus should be a flag or dropdown rather than string param
- oxford asl 6 : is folder input supported?
- Make the CivetOutput viewer more tolerant of missing files
- Updating boutiques descriptor and container for hippunfold v1.1.0? HOT 14
- Remove 'exit' statement at end of CIVET wrappers
- allow multiple inputs in boutiques_bids_single_subject_maker, and/or arbitrary prefixes to bids subjects folder names HOT 1
- BrainBrowser value display issue.
- BrainBrowser error is not passed to CBRAIN HOT 1
- BrainBrowser stop working in QC panel
- The MCFLIRT descriptor doesn't have a proper custom section for special Boutiques modules HOT 1
- We should update the README file HOT 1
- CBRAIN interface Alphabetic sorting of Tags HOT 1
- BrainBrowser integration issue.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cbrain-plugins-neuro.