Wednesday, March 13, 2013

Bioinformatics 101: General Coding Information





  • Understanding Docker (high-level introduction)
  • Docker User Guide
  • My Notes (read tutorials first):
    • To mount Windows Documents folder, docker run -it -v /c/Users/[your username]/Documents:/mnt/[mounted name] [image]
      • If you need to re-enter an exited session, you can use docker start -ia container_ID to re-open it (note use of container ID instead of image ID)
    • docker ps -a to see exited interactive jobs
    • If if host your images on Docker Hub, try to keep them under 3 GB
      • To upload (after running an interactive session):
        • docker commit -m "update message" container_ID [image]
        • docker push [image]

  • C and R:
  • My Notes
    • For g++ compiler, binary output is created with "-o"
      • You can use "-g" option for debugging and "-Wall" for warning messages, but you'll still get error messages either way
    • If mixing your code with open-source code, take the compiler into consideration.  For example, some string functions that work when compiling in gcc but not g++.


  • Vi Text Editor
  • Notepad++ Editor
    • With default settings, if you write code in Notepad++ and run the code on a Linux system, it may sometimes be helpful to run 'dos2unix` on your code
    • Ubuntu Notepad++ Alternatives (I recommend gedit)
  • Basic MS-DOS tutorial
  • LaTeX tutorial
  • MiKTeX - Windows software for processing Tex/LaLeX files; also useful for compiling R packages
  • MacTeX - Mac software for processing Tex/LaLeX files
  • Subversion high-speed tutorial
  • Using subversion for Bioconductor packages
  • Google Code University
  • Git Bioconductor Tricks
    • For managing GitHub repository and Bioconductor Repository: 
    • You can confirm that the upstream repository has been added with "git remote -v"
    • You may need passcode to run "git clone[PACKAGE].git", but other users can clone repository with "git clone[PACKAGE]"
    • If you prefer working with the GitHub interface ("origin" in the instructions above), you can indirectly update the Bioconductor repository as follows (except if Bioconductor changes a file, such as the description file in new releases) :
      • git clone[username]/[package]
      • cd [package folder]
      • git remote add upstream[package].git
        • If needing to update release branch, please see Tutorial for fixing bugs
        • If already synced (and you have checked out the appropriate release), you can also update the branch with "git push" and "git push upstream."
      • git add [updated files]
      • git commit -m "update message"
      • git push upstream master
      • git push origin master
  • VirtualBox Virtual Machine
    • Ubuntu .iso
    • Mounting shared folders
      • When you first open Virtual Box, choose settings for your image and define folder (under "Shared Folders")
      • To make that folder accessible, go to "Devices --> Insert Guest Additions CD image"
      • Probably should restart machine
      • Your folder should appear under /media/sf_[folder name]
      • However, you may still not have access to the contents of that folder.  To fix the permissions issue, run sudo mount -t vboxsf [folder name] /media/sf_[folder name]
      • This might not be sufficient to have folder load everytime you start the VM.  If you run into issues, try sudo usermod -G vboxsf -a [username] after re-mounting folder 

No comments:

Post a Comment

Creative Commons License
My Biomedical Informatics Blog by Charles Warden is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 United States License.