users:guides:getting_structure_output
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
users:guides:getting_structure_output [2018/06/18 11:48] – admins_ceab | users:guides:getting_structure_output [2018/06/18 12:19] (current) – admins_ceab | ||
---|---|---|---|
Line 5: | Line 5: | ||
After a long work searching how to save the outputs of the programs executed as R, Miguel downloades the [source code of the ParallelStructure library](https:// | After a long work searching how to save the outputs of the programs executed as R, Miguel downloades the [source code of the ParallelStructure library](https:// | ||
+ | He unpaccked the source tar.gz: | ||
- | |||
- | Descomprimo el paquete | ||
```bash | ```bash | ||
# tar zxvf ParallelStructure_1.0.tar.gz | # tar zxvf ParallelStructure_1.0.tar.gz | ||
``` | ``` | ||
- | el archivo que busco está en ParallelStructure/ | ||
- | Esta función en algún punto debería llamar a Structure. Voilà: | + | The file we were searching for is in ParallelStructure/ |
- | ```code=r | + | Somewhere into the function it would be some call to Structure. Vualà: |
+ | |||
+ | ``` | ||
217 # | 217 # | ||
218 Sys.sleep(job$wait) | 218 Sys.sleep(job$wait) | ||
Line 22: | Line 22: | ||
``` | ``` | ||
- | La primera opción que se me ocurrió fue esta: | + | The first solution Miguel thinked was: |
- | ```R | + | ``` |
217 # | 217 # | ||
218 Sys.sleep(job$wait) | 218 Sys.sleep(job$wait) | ||
Line 31: | Line 31: | ||
``` | ``` | ||
- | Lo vuelvo | + | Then he paccked all again in a tar.gz and copied all to the proves machine |
``` | ``` | ||
# tar zcvf ParallelStructure_1.0.tar.gz ParallelStructure | # tar zcvf ParallelStructure_1.0.tar.gz ParallelStructure | ||
``` | ``` | ||
- | Y lo instalo en R, atención al comando, que no es el de siempre: | + | |
+ | Then, with aun unusual command, | ||
``` | ``` | ||
Line 43: | Line 45: | ||
``` | ``` | ||
- | Tenía serias dudas de que fuera a instalarse tan fácilmente, pero se instala. Paso también todos los archivos que necesito para ejecutar | + | He has some doubts that it works so easily, but in fact, it did it. He copied all the files he needed it to execute |
- | Retoco los paths de structure.R, | + | He retouch the paths from structure.R, |
+ | ``` | ||
chmod +x structure.sh | chmod +x structure.sh | ||
./ | ./ | ||
+ | ``` | ||
+ | But there is some problem: everytime that we run the program overwrite the file, and we need to save one file per generated result. After talking with Xavi, I returned to the source code. Now I modified some lines before: | ||
- | pero me encuentro que sobreescribe el archivo cada vez y necesito guardar uno por cada resultado generado. Después de pensarlo con Xavi vuelvo de nuevo al código fuente. Fijándome en unas líneas más arriba, modifico de nuevo la línea que me interesa: | + | ``` |
- | + | ||
- | ```R | + | |
206 # generate parameted file for structure | 206 # generate parameted file for structure | ||
207 param_nam=paste(' | 207 param_nam=paste(' | ||
- | + | (...) | |
219 | 219 | ||
``` | ``` | ||
- | Después tengo que repetir todo el proceso | + | After repeating all the process |
- | Por si acaso vuelvo a generar los joblists, borro la carpeta de resultados | + | |
- | Y esta vez sí, ahora tenemos todos lo archivos generados. | + | Then we have to replicate into the cluster. He installed the library in R-3.4.3. |
- | Ahora solo queda replicarlo en el cluster. Instalaré el paquete en el R-3.4.3. |
users/guides/getting_structure_output.1529322509.txt.gz · Last modified: by admins_ceab