User Tools

Site Tools


assignment5

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revision Both sides next revision
assignment5 [2018/10/18 08:51]
dokuroot created
assignment5 [2018/10/18 09:01]
dokuroot
Line 1: Line 1:
 +~~NOTOC~~
 ===== ASSIGNMENT 5 ===== ===== ASSIGNMENT 5 =====
 ---- ----
Line 8: Line 9:
  
 ====Exercise 1==== ====Exercise 1====
-Write a function, '​transposer(matrix)',​ that swaps the rows and columns of a matrix and returns the results as a new matrix.+Write a function, ​''​transposer(matrix)'', that swaps the rows and columns of a matrix and returns the results as a new matrix.
  
 For example: For example:
Line 21: Line 22:
 ====Exercise 2==== ====Exercise 2====
  
-Write a function, '​miRNA_counter(input_fastq_file,​ input_fasta_file,​ output_file)',​ counts the number of times each miRNA appears in a small RNA high-throughput sequencing library.+Write a function, ​''​miRNA_counter(input_fastq_file,​ input_fasta_file,​ output_file)'', ​that counts the number of times each miRNA in a fasta file appears in a small RNA high-throughput sequencing library.
  
-The function should read in, line by line in a for loop, a fastq file containing the small RNA library data and create a dictionary with the key being the sequence and the value being the number of reads for that sequence (you'​ll need to use the get method and use the approach demonstrated in class)+fastq file: [[ http://rna.colostate.edu/​dokuwiki/​doku.php?​id=sample_data | small_RNAs.fastq]]\\ 
-Next, the function read in a fasta file containing the miRNA sequences, again line by line, store the miRNA name as a variable, and then calculate the number of reads for the corresponding sequence, using the get method and the dictionary of fastq sequences from above.+fasta file: [[ http://​rna.colostate.edu/​dokuwiki/​doku.php?​id=sample_data | c_elegans_miRNAs.fa]]
  
 +The function should:
 +\\
 +1. Read in, line by line in a for loop, a fastq file containing the small RNA library data. \\
 +\\
 +2. Create a dictionary with each key being the sequence and the value being the number of reads for that sequence (you'​ll need to use the get method and use the approach demonstrated in class). \\
 +\\
 +3. Read in a fasta file containing the miRNA sequences, again line by line.\\
 +\\
 +4. Store the miRNA name as a variable, and then calculate the number of reads for the corresponding sequence, using the get method and the dictionary of fastq sequences from above.\\
 +\\
 +5. Write to an output file, the name of the miRNA and the number of reads in tab delimited format.
  
   #​input_fastq_file:​   #​input_fastq_file:​
Line 48: Line 60:
   let-7 1   let-7 1
   lin-4 0   lin-4 0
- 
assignment5.txt · Last modified: 2018/10/20 17:37 by dokuroot