Skip to content

Commit

Permalink
sync
Browse files Browse the repository at this point in the history
  • Loading branch information
naumenko-sa committed May 17, 2019
1 parent e66d284 commit b384be7
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
Binary file not shown.
4 changes: 2 additions & 2 deletions scripts/crt.bam2junctions.pbs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ CRT_HOME='/home/naumenko/crt'

if [ -z "$genes" ]
then
genes=$CRT_HOME/genes.bed
genes=$CRT_HOME/data/genes.bed
fi

module load python/3.5.2
python3 $CRT_HOME/SpliceJunctionDiscovery.py -genes=$genes -bam=$bam
python3 $CRT_HOME/scripts/SpliceJunctionDiscovery.py -genes=$genes -bam=$bam
2 changes: 1 addition & 1 deletion scripts/crt.filter_junctions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ then
bam=$1
fi

python3 ~/crt/FilterSpliceJunctions.py --sample $bam 5 0.05
python3 ~/crt/scripts/FilterSpliceJunctions.py --sample $bam 5 0.05

cat ${bam}_specific_rc5_norm_rc0.05_n_gtex_184 | grep -v BOTH > $bam.rare_junctions.txt
2 changes: 1 addition & 1 deletion scripts/crt.load_junctions.pbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ CRT_HOME='/home/naumenko/crt'
module load python/3.5.2
module load sqlite/3.20.0

python3 $CRT_HOME/AddJunctionsToDatabase.py \
python3 $CRT_HOME/scripts/AddJunctionsToDatabase.py \
--addBAM \
-bam=$bam \
-flank=2
2 changes: 1 addition & 1 deletion scripts/crt.mds.pbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
#PBS -d .
#PBS -l vmem=20g,mem=20g

Rscript ~/crt/crt.naumenko2018.R $refresh
Rscript ~/crt/scripts/crt.mds.R mds_work $refresh
5 changes: 2 additions & 3 deletions scripts/crt.utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,13 @@ feature_counts2rpkm <- function(filename){
# filename <- "S100_47-1-Myo.bam.feature_counts.txt"
# first line in the file is a comment
counts <- read_tsv(filename, skip = 1) %>%
select(Geneid, Length, last_col()) %>%
dplyr::select(Geneid, Length, last_col()) %>%
rename(ensembl_gene_id = Geneid, length = Length)
colnames(counts) <- gsub(".bam","", colnames(counts))

sample_name <- colnames(counts)[3]
counts$rpkm <- rpkm(counts[,sample_name], counts$length)
counts <- counts %>% select(ensembl_gene_id, rpkm) %>% rename(!!sample_name := rpkm)
counts <- counts %>% dplyr::select(ensembl_gene_id, rpkm) %>% rename(!!sample_name := rpkm)
return(counts)
}

Expand Down Expand Up @@ -747,7 +747,6 @@ if (length(args) == 0 || args[1] == "--help"){
cat("splicing.read_novel_splice_events sample.bam.rare_junctions.txt\n")
}else{
cat(paste0("Running function: ", args[1],"\n"))
init()
fcn <- get(args[1])
fcn(tail(args,-1))
}
Expand Down

0 comments on commit b384be7

Please sign in to comment.