This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# source of this function: https://github.com/hms-dbmi/UpSetR/issues/85#issuecomment-327900647 | |
fromList <- function (input) { | |
# Same as original fromList()... | |
elements <- unique(unlist(input)) | |
data <- unlist(lapply(input, function(x) { | |
x <- as.vector(match(elements, x)) | |
})) | |
data[is.na(data)] <- as.integer(0) | |
data[data != 0] <- as.integer(1) | |
data <- data.frame(matrix(data, ncol = length(input), byrow = F)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export BLASTDB=/data/public_data/NCBI/NCBI_all/ #and specify the db as -db nt |or -db /data/public_data/NCBI/NCBI_nt/nt | |
export PATH=/applications/UCSC-tools/:/applications/ncbi-blast+/ncbi-blast-2.2.30+/bin/:$PATH | |
#subsetting and converting into fasta | |
file=sample.fq.gz | |
filefa=${file%.fq.gz}_subset.fa | |
n=400000 | |
zcat $file | head -n $n > ${file%.fq.gz}_subset.fq | |
fastqToFa ${file%.fq.gz}_subset.fq $filefa |