Tips

Check your output

You should validate your dna_analysis.py program’s output using the Diff Checker tool before submitting your assignment. You can compare your output to the files given in the expected_output directory of the homework2 files. Drag a file into the “Original Text” pane in the Diff Checker. Select text in a terminal window, paste it into the other pane (“Changed Text”), and select “Find Difference”.

Editing Text Files

You will submit answers.txt as a text file. Plain text is a common standard for communicating information among programmers (and computers) because it can be read on any computer without installing additional software. We recommend editing text files using VSCode, but you can use another text editor (just make sure to save as a text file with the .txt extension).

VSCode Terminal

In the past some students have had trouble running from the command line when folder names had spaces in them. You may find it easiest to avoid this (that is, rename your folders so they do not have spaces in the name). Also, be sure you are using the VSCode Terminal so that Anaconda Python and the cse160 environment is configured as the Python version used on the command line. When you type: python --version you should see: Python 3.7.X (the X number doesn’t matter so much). As long as you have anything newer than Python 3.7, you should be good for this course.

Copy and Pasting

Left click and drag the mouse to select text from anywhere in the command prompt window. Once you have highlighted what you want, use (control + C in Windows, command + C in Mac) to select it and then (control + V in Windows, command + V in Mac) to paste into Diff Checker or a text file.

Common Issues

File Not Found

If you get this error when running verify_setup.py, then double check that you correctly unzipped homework2.zip and opened the correct folder from Getting the Assignment section.

An error occurred:
Traceback (most recent call last):
  File "verify_setup.py", line 13, in 
      assert os.path.exists(os.path.join(data_path, f)), f"{f} was not found in data folder!"

AssertionError: test-small.fastq was not found in data folder!

MacOS Issues with VSCode and Conda

If you run verify_setup.py and find that it is displays Python 2.7.X, be sure that you are using python3 instead of python when you run Python files in the terminal. If that doesn’t solve the issue, follow these steps:

  1. Open the Command Pallet (Help | Show all commands)
  2. Type in Open Settings (JSON) to open settings.json. Be sure to open settings.json and not defaultSettings.json.
  3. Add in this line between the curly braces "terminal.integrated.inheritEnv": false being sure that you add a comma to the end of the preceding line if there is an entry.
  4. Restart VSCode and then run verify_setup.py once more.

Windows Issues with VSCode and Conda

If you use Windows and get an error saying The term ‘conda’ is not recognized as the name of a cmdlet, function, script file, or operable program, try the following steps:

  1. Open the Command Pallet (Help | Show all commands)
  2. Type in Open Settings (JSON) to open settings.json. Be sure to open settings.json and not defaultSettings.json.
  3. Add in this line between the curly braces "terminal.integrated.defaultProfile.windows": "Command Prompt", being sure that you add a comma to the end of the preceding line if there is an entry.
  4. Restart VSCode and then run verify_setup.py once more.