Advertisement
ProzacR

create_count_matrix.R

Oct 25th, 2019
679
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
R 0.64 KB | None | 0 0
  1. library(isomiRs)
  2.  
  3. #https://rdrr.io/github/lpantano/isomiRs/man/IsomirDataSeqFromFiles.html
  4.  
  5. path <- "/data/data_fastq/reads_colapsed/aligner_output_mirna"
  6. fn_list <- list.files(path, pattern="mirna", full.names = TRUE)
  7. de <- data.frame(fn_list)
  8. ids <- IsomirDataSeqFromFiles(fn_list, coldata=de)
  9. count_matrix<-counts(ids)
  10. colnames(count_matrix)<-list.files(path, pattern="mirna")
  11. write.csv(count_matrix, file="count_matrix.csv")
  12.  
  13.  
  14. #head(counts(ids))
  15. #IsomirDataSeqFromRawData(metadata(ids)[["rawData"]], de)
  16. #http://lpantano.github.io/isomiRs/reference/isoCounts.html
  17. #data(mirData)
  18. #ids <- isoCounts(mirData, ref=TRUE)
  19. #head(counts(ids))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement