Mercurial > repos > nturaga > minfi_pipeline
annotate help/help-scripts/.Rhistory @ 1:a78f84fc4873 draft default tip
planemo upload commit fb90aafc93e5e63acfcdac4c27cfd865cdf06c5a-dirty
author | nturaga |
---|---|
date | Tue, 19 Apr 2016 12:20:29 -0400 |
parents | 84361ce36a11 |
children |
rev | line source |
---|---|
0
84361ce36a11
planemo upload commit fb90aafc93e5e63acfcdac4c27cfd865cdf06c5a-dirty
nturaga
parents:
diff
changeset
|
1 packageExpand = function(packagelist,fl) { |
84361ce36a11
planemo upload commit fb90aafc93e5e63acfcdac4c27cfd865cdf06c5a-dirty
nturaga
parents:
diff
changeset
|
2 res = NULL |
84361ce36a11
planemo upload commit fb90aafc93e5e63acfcdac4c27cfd865cdf06c5a-dirty
nturaga
parents:
diff
changeset
|
3 for (i in c(1:length(packagelist))) { |
84361ce36a11
planemo upload commit fb90aafc93e5e63acfcdac4c27cfd865cdf06c5a-dirty
nturaga
parents:
diff
changeset
|
4 s = packagelist[i] |
84361ce36a11
planemo upload commit fb90aafc93e5e63acfcdac4c27cfd865cdf06c5a-dirty
nturaga
parents:
diff
changeset
|
5 ls = nchar(s) |
84361ce36a11
planemo upload commit fb90aafc93e5e63acfcdac4c27cfd865cdf06c5a-dirty
nturaga
parents:
diff
changeset
|
6 spos = which(substr(fl,1,ls) == s,arr.ind=T) |
84361ce36a11
planemo upload commit fb90aafc93e5e63acfcdac4c27cfd865cdf06c5a-dirty
nturaga
parents:
diff
changeset
|
7 lspos = length(spos) |
84361ce36a11
planemo upload commit fb90aafc93e5e63acfcdac4c27cfd865cdf06c5a-dirty
nturaga
parents:
diff
changeset
|
8 if (lspos > 0) |
84361ce36a11
planemo upload commit fb90aafc93e5e63acfcdac4c27cfd865cdf06c5a-dirty
nturaga
parents:
diff
changeset
|
9 { |
84361ce36a11
planemo upload commit fb90aafc93e5e63acfcdac4c27cfd865cdf06c5a-dirty
nturaga
parents:
diff
changeset
|
10 fullname = fl[spos] |
84361ce36a11
planemo upload commit fb90aafc93e5e63acfcdac4c27cfd865cdf06c5a-dirty
nturaga
parents:
diff
changeset
|
11 if (grepl('*.gz',fullname)) { |
84361ce36a11
planemo upload commit fb90aafc93e5e63acfcdac4c27cfd865cdf06c5a-dirty
nturaga
parents:
diff
changeset
|
12 row = paste(ps,fullname,pe,sep='') |
84361ce36a11
planemo upload commit fb90aafc93e5e63acfcdac4c27cfd865cdf06c5a-dirty
nturaga
parents:
diff
changeset
|
13 res = append(res,row) |
84361ce36a11
planemo upload commit fb90aafc93e5e63acfcdac4c27cfd865cdf06c5a-dirty
nturaga
parents:
diff
changeset
|
14 } |
84361ce36a11
planemo upload commit fb90aafc93e5e63acfcdac4c27cfd865cdf06c5a-dirty
nturaga
parents:
diff
changeset
|
15 } |
84361ce36a11
planemo upload commit fb90aafc93e5e63acfcdac4c27cfd865cdf06c5a-dirty
nturaga
parents:
diff
changeset
|
16 } |
84361ce36a11
planemo upload commit fb90aafc93e5e63acfcdac4c27cfd865cdf06c5a-dirty
nturaga
parents:
diff
changeset
|
17 return(res) |
84361ce36a11
planemo upload commit fb90aafc93e5e63acfcdac4c27cfd865cdf06c5a-dirty
nturaga
parents:
diff
changeset
|
18 } |
84361ce36a11
planemo upload commit fb90aafc93e5e63acfcdac4c27cfd865cdf06c5a-dirty
nturaga
parents:
diff
changeset
|
19 getPackages = function(packs) |
84361ce36a11
planemo upload commit fb90aafc93e5e63acfcdac4c27cfd865cdf06c5a-dirty
nturaga
parents:
diff
changeset
|
20 { |
84361ce36a11
planemo upload commit fb90aafc93e5e63acfcdac4c27cfd865cdf06c5a-dirty
nturaga
parents:
diff
changeset
|
21 packages = unlist(tools::package_dependencies(packs, available.packages(), |
84361ce36a11
planemo upload commit fb90aafc93e5e63acfcdac4c27cfd865cdf06c5a-dirty
nturaga
parents:
diff
changeset
|
22 which=c("Depends", "Imports"), recursive=TRUE)) |
84361ce36a11
planemo upload commit fb90aafc93e5e63acfcdac4c27cfd865cdf06c5a-dirty
nturaga
parents:
diff
changeset
|
23 packages = union(packs, packages) |
84361ce36a11
planemo upload commit fb90aafc93e5e63acfcdac4c27cfd865cdf06c5a-dirty
nturaga
parents:
diff
changeset
|
24 packages |
84361ce36a11
planemo upload commit fb90aafc93e5e63acfcdac4c27cfd865cdf06c5a-dirty
nturaga
parents:
diff
changeset
|
25 } |
84361ce36a11
planemo upload commit fb90aafc93e5e63acfcdac4c27cfd865cdf06c5a-dirty
nturaga
parents:
diff
changeset
|
26 packageExpand(c("minfi")) |