Skip to content

Commit

Permalink
compatibility change for lncRNA-screen
Browse files Browse the repository at this point in the history
  • Loading branch information
gongyixiao committed Aug 19, 2016
1 parent ba77995 commit 3f41aef
Show file tree
Hide file tree
Showing 626 changed files with 300,528 additions and 42 deletions.
Binary file removed code/.DESeq2.r.swp
Binary file not shown.
6 changes: 5 additions & 1 deletion code/By_Sample
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

if [ -f code/custom_bash_profile ]; then source code/custom_bash_profile; fi # shell settings
source code/custom-bashrc

CWD=`pwd`

Expand All @@ -11,6 +11,10 @@ fi
params=$1
SAMPLE=$2


if [ `cat $CWD/${SAMPLE}.out | wc -l` -eq 1 ]; then exec >> $CWD/$SAMPLE.out;else exec > $CWD/$SAMPLE.out; fi
exec 2>&1

FLAG=0
if [ ! -z `qstat -j $JOB_ID | grep "tmp_free" | sed 's/ +//g' | cut -d ' ' -f1` ]
then
Expand Down
5 changes: 4 additions & 1 deletion code/Summarize
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

if [ -f code/custom_bash_profile ]; then source code/custom_bash_profile; fi # shell settings
source code/custom-bashrc

if [ "$#" -ne 4 ] && [ "$#" -ne 3 ]
then
Expand All @@ -20,6 +20,9 @@ group_sheet=`basename $group_info | sed 's/\.txt$//g'`

params=`cat $PARAMS | grep "^DESeq2" | cut -f2`

if [ `cat ${GROUP}.out | wc -l` -eq 1 ]; then exec >> $GROUP.out;else exec > $GROUP.out; fi
exec 2>&1

cd $OUT_DIR

mkdir -p $group_sheet
Expand Down
2 changes: 1 addition & 1 deletion code/align_summary
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

if [ -f code/custom_bash_profile ]; then source code/custom_bash_profile; fi # shell settings
source code/custom-bashrc

if [ "$#" -lt 1 ]; then
printf "\n\n###### Usage\n\n"
Expand Down
20 changes: 20 additions & 0 deletions code/custom-bashrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash


PS1="[\u@\h \W]\$ "


PATH=code/:code/bin/:code/utilities/:code/utilities/STAR/:code/utilities/sratoolkit/:code/utilities/cufflinks/:code/utilities/CPAT/:code/utilities/fastqc/:code/utilities/subread:$PATH

PYTHONPATH=code/utilities/utilities/CPAT/lib/:$PYTHONPATH

export LC_ALL=C
export PATH
export PYTHONPATH

export PERL5LIB=$HOME/lib
export EDITOR="/usr/local/bin/mate -w"

module load samtools/0.1.19
module load r/3.3.0
module load python/2.7
20 changes: 0 additions & 20 deletions code/custom_bash_profile

This file was deleted.

2 changes: 1 addition & 1 deletion code/generate_STAR-Index
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

if [ -f code/custom_bash_profile ]; then source code/custom_bash_profile; fi # shell settings
source code/custom-bashrc

if [ "$#" -lt 2 ]; then
printf "\n\n###### Usage\n\n"
Expand Down
2 changes: 1 addition & 1 deletion code/generate_rnaseq_tracks
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

if [ -f code/custom_bash_profile ]; then source code/custom_bash_profile; fi # shell settings
source code/custom-bashrc

if [ "$#" -ne 4 ]; then
printf "\n\n###### Usage\n\n"
Expand Down
6 changes: 4 additions & 2 deletions code/gtf_id2name
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

if [ -f code/custom_bash_profile ]; then source code/custom_bash_profile; fi # shell settings
source code/custom-bashrc

if [ "$#" -ne 1 ]; then
printf "\n\n###### Usage\n\n"
Expand All @@ -12,10 +12,12 @@ INP=$1
TEMP1=$(mktemp)
TEMP2=$(mktemp)

cat $1 | awk '$3~/exon/'| perl -F/\\t/ -lane '@des=split(/ \"|\";\s{0,1}/,$F[8]);for($i=0;$i<@des;$i=$i+2){if($des[$i]=~/gene_id/){$gene_id=$des[$i+1]}elsif($des[$i]=~/gene_name/){$gene_name=$des[$i+1]}else{}}print "$gene_name\t$gene_id"' | sort | uniq | mergeuniq -merge > $TEMP1
cat $INP | grep -v "^#" | awk '{if($1!~/^chr/){print "chr"$0}else{print $0}}' | awk '$3~/exon/'| perl -F/\\t/ -lane '@des=split(/ \"|\";\s{0,1}/,$F[8]);for($i=0;$i<@des;$i=$i+2){if($des[$i]=~/gene_id/){$gene_id=$des[$i+1]}elsif($des[$i]=~/gene_name/){$gene_name=$des[$i+1]}else{}}print "$gene_name\t$gene_id"' | sort | uniq | mergeuniq -merge > $TEMP1

cat $TEMP1 | grep " " | key-expand | cols -t 1 0 | awk '{print $1"\t"$1":"$2}' > $TEMP2

cat $TEMP1 | grep -v " " | cols -t 1 0 >> $TEMP2

cat $TEMP2 | sort -k1,1 | mergeuniq -merge | tr ' ' '|' > ${INP%.*}.id2name.txt

rm -rf $TEMP1 $TEMP2
8 changes: 8 additions & 0 deletions code/job_submitter.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

source code/custom-bashrc

NSLOTS=$1
shift

qsub -b Y -cwd -pe threaded $NSLOTS -l tmp_free=120G -l tmp_token=30G -hard $@
2 changes: 1 addition & 1 deletion code/run_alignment
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

if [ -f code/custom_bash_profile ]; then source code/custom_bash_profile; fi # shell settings
source code/custom-bashrc


if [ "$#" -ne 5 ] && [ "$#" -ne 4 ] && [ "$#" -ne 3 ]
Expand Down
2 changes: 1 addition & 1 deletion code/run_assembly
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

if [ -f code/custom_bash_profile ]; then source code/custom_bash_profile; fi # shell settings
source code/custom-bashrc

if [ "$#" -lt 3 ]; then
printf "\n\n###### Usage\n\n"
Expand Down
6 changes: 3 additions & 3 deletions code/run_fastq-download
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

if [ -f code/custom_bash_profile ]; then source code/custom_bash_profile; fi # shell settings
source code/custom-bashrc


if [ "$#" -lt 2 ]; then
Expand Down Expand Up @@ -87,9 +87,9 @@ then
cd $OUT_DIR/$name_sample/

printf "\n\n***** Downloading $id_sample/${id_file} into $OUT_DIR/$name_sample Using fastq-dump.2...\n"
echo "../code/utilities/sratoolkit/fastq-dump.2 --tries 10 --split-files -A "$id_file" -gzip" >> run.bash
echo "../code/utilities/sratoolkit/fastq-dump.2.4.2 --tries 10 --split-files -A "$id_file" -gzip" >> run.bash
pwd
../code/utilities/sratoolkit/fastq-dump.2 --tries 10 --split-files -A $id_file -gzip
../code/utilities/sratoolkit/fastq-dump.2.4.2 --tries 10 --split-files -A $id_file -gzip

cd $CWD
done
Expand Down
2 changes: 1 addition & 1 deletion code/run_fastq-link
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

if [ -f code/custom_bash_profile ]; then source code/custom_bash_profile; fi # shell settings
source code/custom-bashrc

if [ "$#" -lt 3 ]; then
printf "\n\n###### Usage\n\n"
Expand Down
2 changes: 1 addition & 1 deletion code/run_fastqc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

if [ -f code/custom_bash_profile ]; then source code/custom_bash_profile; fi # shell settings
source code/custom-bashrc

if [ "$#" -lt 2 ]; then
printf "\n\n###### Usage\n\n"
Expand Down
10 changes: 10 additions & 0 deletions code/setup_waiting.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

source code/custom-bashrc

INPUT=$@

for element in ${INPUT[@]}
do
echo "###### START ######" > ${element}.out
done
2 changes: 1 addition & 1 deletion code/summarize_raw_count
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

if [ -f code/custom_bash_profile ]; then source code/custom_bash_profile; fi # shell settings
source code/custom-bashrc

TEMP="$#"
FILE_COUNT=$((TEMP*2))
Expand Down
1 change: 0 additions & 1 deletion code/utilities

This file was deleted.

1 change: 1 addition & 0 deletions code/utilities/CPAT
53 changes: 53 additions & 0 deletions code/utilities/CPAT-1.2.2/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
include distribute_setup.py
recursive-include src *.h
recursive-include src *.c
recursive-include lib *.h
recursive-include lib *.c
recursive-include lib *.pyx
recursive-include doc *

#include MANIFEST.in
#include KNOWN_BUGS
#include ez_setup.py
include dat/*
include test/*
include lib/pysam/csamtools.pxd
include lib/pysam/csamtools.pyx
include lib/pysam/csamtools.c
include lib/pysam/ctabix.pxd
include lib/pysam/ctabix.c
include lib/pysam/ctabix.pyx
include lib/pysam/TabProxies.c
include lib/pysam/TabProxies.pyx
include lib/pysam/TabProxies.pxd
include lib/pysam/cvcf.pyx
include lib/pysam/cvcf.pxd
include lib/pysam/cvcf.c
include lib/pysam/pysam_util.h
include lib/samtools/*.h
include lib/samtools/*/*.h
include lib/tabix/*.h

# pysam tests
include lib/tests/00README.txt
include lib/tests/Makefile
include lib/tests/ex1.fa
include lib/tests/ex1.sam.gz
include lib/tests/ex3.sam
include lib/tests/ex4.sam
include lib/tests/ex5.sam
include lib/tests/ex6.sam
include lib/tests/ex7.sam
include lib/tests/ex8.sam
include lib/tests/ex9_fail.bam
include lib/tests/ex9_nofail.bam
include lib/tests/ex10.sam
include lib/tests/example.py
include lib/tests/pysam_test.py
include lib/tests/segfault_tests.py

# tabix tests
include lib/tests/tabix_test.py
include lib/tests/example.gtf.gz
include lib/tests/example.gtf.gz.tbi

11 changes: 11 additions & 0 deletions code/utilities/CPAT-1.2.2/PKG-INFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Metadata-Version: 1.0
Name: CPAT
Version: 1.2.2
Summary: Coding Potential Assessment Tool
Home-page: http://rna-cpat.sourceforge.net/
Author: Liguo Wang
Author-email: [email protected]
License: UNKNOWN
Description: UNKNOWN
Platform: Linux
Platform: MacOS
Loading

0 comments on commit 3f41aef

Please sign in to comment.