Description Usage Arguments Value
View source: R/Janie_functions.R
This function reads a .wig file and a fasta file into R, pulls out a specified subset of the data, cleans stop counts associated with Gs and Us, Normalizes the data using the Winsorization method, calculates sliding window averages, and writes a csv file for subsequent analysis. It also plots the data as a png for convenient assessments of the result.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
file.wig |
Path to the .wig formatted file |
file.fasta |
Path to the fasta file #'@param start End of the nucleotide range you would like to pull out |
end |
End of the nucleotide range you would like to pull out |
strand |
Strand of the genome you want to analyze. Options: Default = "+" for the forward strand and "-" for the reverse strand |
Name |
Name of the RNA. (This will be the prefix on the file that is saved). Default = "RNA". |
Nucleic_acid |
The nucleic acid you want the output to be. Options: Default = "RNA" to print Us in the final file and "DNA" to print "Ts". |
Winsorization |
Use the Winsorization method to normalize the data. Options: Default = TRUE to do the normalization or FALSE to skip the normalization. |
Normalization_quantile |
Quartile you want to do the Winsorization normalization to. |
Window |
Window type you want to use when calculating mean reactivities in sliding windows. Options: Default = "center" to apply the mean to the nucleotide at the center of the window, or "first" to apply the mean to the first nucleotide in the window. |
Window_size |
Width of the sliding window that you want to apply. Default = 10 nucleotides or any integer. If set to an even integer with Window_type = "center", the program will automatically set to the next highest odd integer. |
Window_step |
How many nucleotides to move before adding another sliding window calculation. Options: Default = 1 or any integer. |
Window_with_Gs_and_Us |
Include Gs and Us in a window size when calculating the means for sliding windows. Options: Default = TRUE to make the absolute window size (how many nucleotides in the RNA the mean averages over) exactly the same. FALSE to have windows only include As and Cs, resulting in inconsistent absolute window sizes. |
custum_windows |
A list of custum windows you want to calculate the mean for. Default = FALSE or a list of vectors in the format custom_windows = list(c(window1.start:window1.end), c(window2.start:window2.end)). Example: custom_windows = list(c(31:42), c(50:200)). Make sure that you use the relative location of the window on the RNA, not the absolute location on the genome. |
A csv file, a plot, and a dataframe
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.