1. # Welcome to the UiB Software Carpentry Course 2024! Shortened link for this document: https://tinyurl.com/SWCBergen2404 Pre-course survey link: https://carpentries.typeform.com/to/wi32rS?slug=2024-04-22-UiB-SWC :::info This document is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents. **Use of this service is restricted to members of The Carpentries community**; this is not for general purpose use (for that, try etherpad.wikimedia.org). Users are expected to follow our **[Code of Conduct](https://docs.carpentries.org/topic_folders/policies/code-of-conduct.html)**. All content is publicly available under the [Creative Commons Attribution License](https://creativecommons.org/licenses/by/4.0/). ::: General questions or feedback? Contact [team@carpentries.org](mailto:team@carpentries.org). :::warning ### Code of Conduct We are dedicated to providing a welcoming and supportive environment for all people, regardless of background or identity. By participating in this community, participants accept to abide by The Carpentries’ Code of Conduct and accept the procedures by which any Code of Conduct incidents are resolved. Any form of behaviour to exclude, intimidate, or cause discomfort is a violation of the Code of Conduct. In order to foster a positive and professional learning environment we encourage the following kinds of behaviours in all platforms and events: - Use welcoming and inclusive language - Be respectful of different viewpoints and experiences - Gracefully accept constructive criticism - Focus on what is best for the community - Show courtesy and respect towards other community members If you believe someone is violating the Code of Conduct, we ask that you report it to The Carpentries Code of Conduct Committee [completing this form](https://docs.google.com/forms/d/e/1FAIpQLSdi0wbplgdydl_6rkVtBIVWbb9YNOHQP_XaANDClmVNu0zs-w/viewform), who will take the appropriate action to address the situation. See more detailed description of the Code of Conduct [here](https://docs.carpentries.org/topic_folders/policies/code-of-conduct.html). ::: ## Introduction We are so happy to see you all here, and we look forward to the following days! [Course page](https://kjemist.github.io/2024-04-22-UiB-SWC/) [Pre-workshop survey](https://carpentries.typeform.com/to/wi32rS?slug=2024-04-22-UiB-SWC) #### This Workshop is enabled by: [UiB Library Digital Lab](https://www.uib.no/digitallab) >> [Event calendar](https://www.uib.no/en/digitallab/calendar) [Centre for Digital Life Norway](https://www.digitallifenorway.org/) >> [Events](https://www.digitallifenorway.org/events/) [ELIXIR Norway](https://elixir.no/) [Norwegian Research Infrastructure Services - NRIS](https://www.sigma2.no/nris) #### This course is organized by: INSTRUCTORS|HELPERS: Illimar Rekand, illimar.rekand@uib.no, University Library of Bergen Korbinian Bösl, Korbinian.Bosl@uib.no, ELIXIR & Digital Life Norway Michael Dondrup, Elixir Norway, Computational Biology Unit Siri Kallhovd, Siri.Kallhovd@uib.no, ELIXIR & NRIS Marco Foscato, marco.foscato@uib.no, Department of Chemistry David Rowan, david.rowan@uib.no, IT-department, UiB Henrik Askjer, henrik.askjer@uib.no, Digital Lab, University Library of Bergen David Dolan, david.dolan@uib.no, ELIXIR Jenny Ostrop, Jenny.Ostrop@uib.no, Digital Lab, University Library of Bergen Matúš Kalaš, Matus.Kalas@uib.no, ELIXIR Samuel Martey Okoe-Mensah, samuel.okoe-mensah@student.uib.no Emma Josefin Ölander Aadland, emma.aadland@uib.no, Digital Lab, University Library of Bergen Dhanya Pushpadas, Dhanya.Pushpadas@uib.no, UiB-ITA & NRIS Please contact us if you have any questions or comments. # Monday 22nd of April :::info ## Schedule* \* Due to change on the fly ### Day 1 Monday 22nd of April: | When? | What? | | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | *Before starting* | [Pre-workshop survey](https://carpentries.typeform.com/to/wi32rS?slug=2024-04-22-UiB-SWC), [Setup](https://swcarpentry.github.io/shell-novice/index.html), Download files required for the lesson | | 09:00 - 09:15 | Introduction (Illimar) :wave: | | 09:15 - 10:00 | Installation help :question: | | 10:00 - 10:45 | The Unix shell (Michael & Siri) :rocket: | | | **[Introducing the Shell](https://swcarpentry.github.io/shell-novice/01-intro.html)** | | | **[Navigating Files and Directories](https://swcarpentry.github.io/shell-novice/02-filedir.html)** | | | **[Working With Files and Directories](https://swcarpentry.github.io/shell-novice/03-create.html)** | | 10:45 - 11:00 | 10-15 minute break :coffee: :toilet: | | 11:00 - 12:00 | **[Pipes and Filters](https://swcarpentry.github.io/shell-novice/04-pipefilter.html)** | | | **[Loops](https://swcarpentry.github.io/shell-novice/05-loop.html)** | | 12:00 | Lunch | | 12:45 | **[Shell Scripts](https://swcarpentry.github.io/shell-novice/06-script.html)** | | | **[Finding things](https://swcarpentry.github.io/shell-novice/07-find.html)** | | 14:00 - 14:15 | 10-15 minute break :coffee: :toilet: | | 14:15 - 15:00 | | | 15:30 | Wrap-up, Feedback | | 16:00 | End | ::: ### Before we start, we would like to get to know a bit more about you :) Please add your name to the roll call below, a short snippet of who you are and add your favorite emoji :sunglasses: (you can type ":" and start writing for suggested emojis) Illimar, I am the coordinator of this course, and will also be a helper today :tophat: Marco (helper): Researcher at the Chemistry department (UiB). Hi! Dhanya (helper):UiB-ITA & NRIS, Hi! (helping today and Wednesday) Janne (PhD Centre for Climate and Energy Transformation, Communication research) 😊 Dave (helper)< Hi! :Coffee: (maybe this is a multi :coffee: day :coffee:!) Gunn Inger (researcher in lexicograpy at University of Bergen, interested in learning Python) :sunny: Marianna Anichini (Postdoc - GEO): Hi everyone! Nikhil: Hi 🧑🏻‍💻 Postdoc researcher in genetic epidemiology at NTNU Valeria, I am a postdoc at the Department of Biomedicine :smiley_cat: Sara (PhD in chemistry) Hi! :heart_eyes: Haoyuan Tang (PhD at CDN): hello world :) 👾👾👾👾 Stand: I am a Phd candidate in the Department of Global Public Health and Primary Care. 🦎 Mike: Hello world :-) José: Hi! PhD student in Neuroscience trying to learn how to programme with R. :fish: Nayan: 🤷‍♀️Hi this is Nayan. I am a Phd researcher at NTNU Ghazal:phd at the department of clinical medicine 🤩 Alice (PhD medicine) :hamster: Anne (helper at the P|ython course tomorrow) :panda_face: Malin (helper at the Python course, visiting the other days) :heart_eyes_cat: Anna, Postdoc at the center for cancer biomarkers :face_palm: Trung: Hi my name is Trung, a postdoc from Oslo working in the Immunopeptidomics field for Immunotherapy, I would love to learn more about R and use it for my work!!! :smiley: Haakon: I'm currently a PhD in medical research with a background in Neuroscience 👁 Theo PhD candidate at the Department of Global Health Pierina: PhD candidate at IGS 👽 Damaris Benny Daniel (Post doc at Faculty of Medicine)😊 Jutta - I am a professor in clinical nutrition where we have many data to handle at the same time as diet and metabolism are both complex - and I want to learn R to do this better! Kirabo Erismas Mugwanya. PhD in Reservoir Geology and subsurface storage Michael Dondrup (Michi): Researcher in Bioinformatics at CBU :man-facepalming: AM OSMAN ELRAYAH : PHD CANDIDATE FROM THE DENTISTRY DEPARTMENT 😁 ### General Questions & Answers before we start: * No questions, all good :smile_cat: ### **[Introducing the Shell](https://swcarpentry.github.io/shell-novice/01-intro.html)** Link for downloading the files: https://swcarpentry.github.io/shell-novice/data/shell-lesson-data.zip Enter questions below: * My prompt looks very different from Siri's. Is it a problem? - No, the looks of the prompt can vary and are customizable. You could make it look whatever you like 😎 :::success #### Key Points * A shell is a program whose primary purpose is to read commands and run other programs. * This lesson uses Bash, the default shell in many implementations of Unix. * Programs can be run in Bash by entering commands at the command-line prompt. * The shell’s main advantages are its high action-to-keystroke ratio, its support for automating repetitive tasks, and its capacity to access networked machines. * The shell’s main disadvantages are its primarily textual nature and how cryptic its commands and operation can be. ::: ### **[Navigating Files and Directories](https://swcarpentry.github.io/shell-novice/02-filedir.html)** Enter questions below: * Write your question here... - Answer will come here... * Some jargon * `~` is a shortcut to your home directory. You can use `cd ~` to change to your home directory in one command. * `..` is the parent folder (i.e., the folder containing the folder where we are now). `cd ..` moves you to the parent directory * `.` is "here", the directory you are in right now * A hidden file (or directory) is a file that isn't shown with a normal `ls` command. They normally start with the character `.` such as `.ssh`. To see hidden files you must use the `ls -a` command (`-a` for "all") * An absolute path starts with a `/` (or with the drive name in Windows, e.g., `C:`) a relative path does not. (special case for `~` which is an absolute path) :::success *KEY POINTS* * The file system is responsible for managing information on the disk. * Information is stored in files, which are stored in directories (folders). * Directories can also store other directories, which then form a directory tree. * pwd prints the user’s current working directory. * ls [path] prints a listing of a specific file or directory; ls on its own lists the current working directory. * cd [path] changes the current working directory. * Most commands take options that begin with a single -. * Directory names in a path are separated with / on Unix, but \ on Windows. * / on its own is the root directory of the whole file system. * An absolute path specifies a location from the root of the file system. * A relative path specifies a location starting from the current location. * . on its own means ‘the current directory’; .. means ‘the directory above the current one’. ::: ### **[Working With Files and Directories](https://swcarpentry.github.io/shell-novice/03-create.html)** Here is the link to [download the data for the shell lessons](https://swcarpentry.github.io/shell-novice/data/shell-lesson-data.zip) :::success *KEY POINTS* - `cp [old] [new]` copies a file. - `mkdir [path]` creates a new directory. - `mv [old] [new]` moves (renames) a file or directory. - `rm [path]` removes (deletes) a file. - `*` matches zero or more characters in a filename, so `*.txt` matches all files ending in `.txt`. - `?` matches any single character in a filename, so `?.txt` matches `a.txt` but not `any.txt`. - Use of the Control key may be described in many ways, including `Ctrl-X`, `Control-X`, and `^X`. - The shell does not have a trash bin: once something is deleted, it's really gone. - Most files' names are `something.extension`. The extension isn't required, and doesn't guarantee anything, but is normally used to indicate the type of data in the file. - Depending on the type of work you do, you may need a more powerful text editor than Nano. ::: ### **[Pipes and Filters](https://swcarpentry.github.io/shell-novice/04-pipefilter.html)** Enter questions below: * Where can I find the `|` symbol on my keyboard? * standard QWERTY Norwegian keyboard layout: `§½` found to the left of `1!`. * Mac QWERTY Norwegian keyboard layout: `ALT` `+` `7` - This might change if you did a `Terminal -> Settings ->Keyboard krysset av "Use Option As Meta` settings * QWERTY English keyboard layout: `\|` found to the left of `Z` * QWERTZ German keyboard layout: `<>|` found to the left of `Y` * Why using `>>` should be useful? Ok I am seeing it now.. - `>>` appends to a file while `>` overwrites that file. Some jargon * `>` is called the __redirect__ operator. It sends output that would normally appear on screen to a file e.g. `wc -l *.pdb > lengths.txt` sends output from `wc -l *.pdb` to `lengths.txt` * `|` is called the __pipe__ operator. It takes the output of one command and _pipes_ it into the next command :::success keypoints * wc counts lines, words, and characters in its inputs. * cat displays the contents of its inputs. * sort sorts its inputs. * head displays the first 10 lines of its input. * tail displays the last 10 lines of its input. * command > [file] redirects a command's output to a file (overwriting any existing content). * command >> [file] appends a command's output to a file. * [first] | [second] is a pipeline: the output of the first command is used as the input to the second. * The best way to use the shell is to use pipes to combine simple single-purpose programs (filters). ::: ### **[Loops](https://swcarpentry.github.io/shell-novice/05-loop.html)** Enter questions below: :::success keypoints * A for loop repeats commands once for every thing in a list. * Every for loop needs a variable to refer to the thing it is currently operating on. * Use $name to expand a variable (i.e., get its value). ${name} can also be used. * Do not use spaces, quotes, or wildcard characters such as ‘*’ or ‘?’ in filenames, as it complicates variable expansion. * Give files consistent names that are easy to match with wildcard patterns to make it easy to select them for looping. * Use the up-arrow key &uarr; to scroll up through previous commands to edit and repeat them. * Use `Ctrl+R` to search through the previously entered commands. * Use history to display recent commands, and ![number] to repeat a command by number. ::: ### **[Shell Scripts](https://swcarpentry.github.io/shell-novice/06-script.html)** Enter questions below: :::success keypoints * Save commands in files (usually called shell scripts) for re-use. * bash [filename] runs the commands saved in a file. * $@ refers to all of a shell script’s command-line arguments. * $1, $2, etc., refer to the first command-line argument, the second command-line argument, etc. * Place variables in quotes if the values might have spaces in them. * Letting users decide what files to process is more flexible and more consistent with built-in Unix commands. ::: ### **[Finding things](https://swcarpentry.github.io/shell-novice/07-find.html)** Enter questions below: :::success keypoints * find finds files with specific properties that match patterns. * grep selects lines in files that match patterns. * --help is an option supported by many bash commands, and programs that can be run from within * Bash, to display more information on how to use these commands or programs. * man [command] displays the manual page for a given command. * $([command]) inserts a command’s output in place. ::: :::info - [Linux command cheat sheat (NRIS)](https://training.pages.sigma2.no/tutorials/unix-for-hpc/cheat-sheet.html) ::: ## Feedback Day 1: All feedbacks are provided anonymously and we cannot track your response (unless you provide us with a name, which is not necessary) ### Positive: * Brain blowing, intense, hurtfull but helpful at the same time :) * It was very helpful. I had no idea about programming but the course is helping me build the basics. * In general, it was easy to follow the lectures and ask for help :) * It was a great course * (Not for this course; but I would love to join a similar course not as beginner as this one) * Many helpers! Excellent climate friendly lunch! Easy to follow! Much needed! * I really enjoyed and I think that I learned new things and got more confident in what I knew already. Your patience and support are amazing! * Very interesting to learn about! Great with examples on the screen that we could do the different tasks at the same time * It is nice to see what my dad spent his life doing as work * Excellent help! (Very helpful and friendly helpers) * Very well prepared & organised * Great course & preparation done! You guys are so dedicated on teaching us! Thank you! * Very informative so far! Looking to the rest of course! * Very informative! * All good * Great to have a support team around * The course is fantastic ### Negative * A bit too much in limited time * Go a little bit slower * It was not easy to see the screens :( * Not enough explanations. Too much tehcnical language assuming knowledge people who are new to this don't know. Too fats on the examples. Not waiting for those w problems to catch up * The session in the afternoon went to fast. Several things I couldn't follow * Difficult to see screens. Suggesting "Arbeidsrom" @ UPihil next time. Explain what wer are going todo befor we start writing the code - context :heart: * At times it went by really fast, and it felt a little bit unstructured * Nothing really went wrong may be some exercises on loops next time * I missed the application part of these tools. For ex.: why should I use the for loop? Why should I use the sort? I missed relating these tools to a "research question." May be a case scenario & research question would help! * Too much content, screens are not large enough * A bit fast on some of the sessions. * A bit too slow and seemed a bit unplanned and unstructured. But maybe it was because of the need to wait. Perhaps it would have been useful to split up in complete beginners vs. some previous experience. # Tuesday 23rd of April: ## Roll call Please add your **name** to the roll call below, mark whether you're taking **Python or R**, and an **emoji** how you feel at the moment 🤔 And if you haven't done so [yesterday](#Before-we-start-we-would-like-to-get-to-know-a-bit-more-about-you-), please also a **short snippet of who you are**. Trung: Hi all, really excited to learn more about R today!!! :horse_racing: Jutta Dierkes looking forward to learn about R today - yesterday was quite demanding! Valeria Hi all, postdoc at UiB, here to learn about python :crab: Illimar (helper/instructor), Librarian at University Library of Bergem :rocket: Malin (helper at Python) :face_with_cowboy_hat: Famke (helper at Python) :sunny: Anne (helper at Python) :panda_face: Haakon: PhD in medical research on Parkinson's disease, background in psychology and neuroscience 👁 Marianna: Postdoctoral researcher at GEO UiB! Happy to learn Python today! Nikhil: Hi all 😎 Postdoctoral researcher in genetic epidemiology at NTNU Janne (PhD, Infomedia/Centre for climate and energy transformation) Good morning! :sunny: Ready for Python! Haoyuan Tang (PhD at CDN) 👾👾👾 Sara (PhD in chemistry) :cat: Kurt Wogau =) Gunn Inger (ph.d. in computational linguistics, researcher in lexicography), ready for Python. :star: Mike: Hello python course Marco (helper) :smile: Dave (helper and UiB IT security): :cookie: Matus (trying to help with R; ex-researcher working on standards and ontologies for scientific data & tools, at Informatics UiB) 🐙 {the R section has also a separate rollcall in the doc linked below} ## Details of the 2 sessions **For R:** [see this CodiMD-document](https://codimd.carpentries.org/s/Q12-mS1p7) R version 4.3.1 (2023-06-16 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) **For Python:** [see this CodiMD-document](https://codimd.carpentries.org/Z4iOvXgzQSqW6Wqn2MjAjw) R version 4.3.3 (2024-02-29 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Jutta ## Feedback Day 2: All feedbacks are provided anonymously and we cannot track your response (unless you provide us with a name, which is not necessary) ### Positive: * Great course, great instructors, great support team * very informative * Really appreciated David's pacing and explanations * Appreciated Korbinian's kindness & enthusiasm * Super course on Python, clear structured and very useful, perfect pace and skilled instructors * Good explanations, Easy to follow, better working idea (Python room) ### Negative * Could have been more systematic and more exercises! * Short time * a lot was still too fast/too much infromation & jargon w/o explanation * Super course on Python, clear structured and very useful, perfect pace and skilled instructors * Too bad lunch was delayed, but that's not your fault :heart: The program can better mirror what we'll actually have time to cover * # Wednesday 24th of April: Please add your name to the roll call below, along with your favorite emoji :sunglasses: Trung: looking forwards to Git control :sunglasses: Sara :stars: Stand 🦠 Pierina 🎵 Nikhil :8ball: Anne :panda_face: Malin :face_with_cowboy_hat: Janne :t-rex: Alice :hamster: Ghazal 🤩 Marianna :sun_with_face: Gunn Inger :sunny: Damaris :🤩 José :fish: Valeria :snake: Jutta smiley :) Nayan ! Marco :smiley_cat: Haakon:👁️ Asieh 😌 Anna :face_palm: Kirabo :::success If you want to receive information about training events, and other announcements about IT resources and services for researchers subscribe to [UiB hpcmailing list](https://mailman.uib.no/listinfo/hpcnews) ::: :::danger 1. Please open terminal, and type `git --version`. Paste the result here into the CodiMD. 2. Please create an account on github.com ::: Nikhil: git version 2.15.0 Trung: git version 2.44.0.windows. José: git version 2.44.0.windows.1 Gunn Inger: git version 2.44.0 (Mac) Ghazal: git version 2.33.0(mac) Janne: git version 2.44.0.windows.1, account created Anne : git version 2.17.2 (mac) Pierina: git version 2.30.0.windows.2 Malin: git version 2.44.0.windows.1 Valeria: git version 2.44.0 Sara: git version 2.44.0.windows.1 Nayan: git version 2.44.0.windows.1 Marianna: git version 2.39.3 linux Stand: git version 2.44.0.windows.1 Alice: git version 2.44.0.windows.1 Haakon: git version 2.44.0 windows.1 git version 2.44.0.windows.1 git version 2.33.0 (Mac) Jutta: git version 2.44.0.windows.1 Anna git version 2.44.0.windows.1 Damaris: git version dracula:git version 2.25.1 (UBUNTU) :::info ## Schedule* \* Due to change on the fly ### Day 3 Wednesday 23rd of April: | When? | What? | | ------------- | ------------------------------------------------------------------------------------ | | 11:00 - 15:30 | Version control with Git | | | [Summary and setup](https://swcarpentry.github.io/git-novice/) | | | [Automated Version Control](https://swcarpentry.github.io/git-novice/01-basics.html) | | | [Setting Up Git](https://swcarpentry.github.io/git-novice/02-setup.html) | | | [Creating a Repository](https://swcarpentry.github.io/git-novice/03-create.html) | | | [Tracking changes](https://swcarpentry.github.io/git-novice/04-changes.html) | | | [Exploring History](https://swcarpentry.github.io/git-novice/05-history.html) | | | [Ignoring things](https://swcarpentry.github.io/git-novice/06-ignore.html) | | | [Remotes in GitHub](https://swcarpentry.github.io/git-novice/07-github.html) | | | [Collaborating](https://swcarpentry.github.io/git-novice/08-collab.html) | | | [Conflicts](https://swcarpentry.github.io/git-novice/09-conflict.html) | | | [Open Science](https://swcarpentry.github.io/git-novice/10-open.html) | | | [Licensing](https://swcarpentry.github.io/git-novice/11-licensing.html) | | | [Citation](https://swcarpentry.github.io/git-novice/12-citation.html) | | | [Hosting](https://swcarpentry.github.io/git-novice/13-hosting.html) | ::: ## [Summary and setup](https://swcarpentry.github.io/git-novice/) :::danger Use `git config --list --show-origin` to troubleshoot ::: You normally only need to configure the setup for Git on your computer 1 time per account per computer Write questions below: ## [Automated Version Control](https://swcarpentry.github.io/git-novice/01-basics.html) :::danger git init ::: to initalize the folder Write questions below Maybe this question will be covered before the end of the day, but if not: what was the point about branches? (how do I actively use it myself later?) After this course: I want to try to use Git. If I run into problems using git (and googling it does not help me) is there something like a community or staff at BRITA (or wherever) where I can ask for help? ## [Setting Up Git](https://swcarpentry.github.io/git-novice/02-setup.html) Write questions below ## [Creating a Repository](https://swcarpentry.github.io/git-novice/03-create.html) Write questions below ## [Tracking changes](https://swcarpentry.github.io/git-novice/04-changes.html) Write questions below ## [Exploring History](https://swcarpentry.github.io/git-novice/05-history.html) Write questions below <!-- ## [Ignoring things](https://swcarpentry.github.io/git-novice/06-ignore.html) Write questions below --> ## [Remotes in GitHub](https://swcarpentry.github.io/git-novice/07-github.html) Write questions below <!-- ## [Collaborating](https://swcarpentry.github.io/git-novice/08-collab.html) Write questions below --> <!-- ## [Conflicts](https://swcarpentry.github.io/git-novice/09-conflict.html) Write questions below --> <!-- ## [Open Science](https://swcarpentry.github.io/git-novice/10-open.html) Write questions below --> <!-- ## [Licensing](https://swcarpentry.github.io/git-novice/11-licensing.html) Write questions below --> <!-- ## [Citation](https://swcarpentry.github.io/git-novice/12-citation.html) Write questions below --> <!-- ## [Hosting](https://swcarpentry.github.io/git-novice/13-hosting.html) Write questions below --> <!-- ## Feedback Day 3: All feedbacks are provided anonymously and we cannot track your response (unless you provide us with a name, which is not necessary) ### Positive: * Response 1.1 * Response 1.2 ### Negative * Response 2.1 * Response 2.2 -->