Skip to content

Commit

Permalink
added rm encode tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
biomystery committed Mar 2, 2020
1 parent c9013b0 commit a438e14
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 3 deletions.
4 changes: 2 additions & 2 deletions utility/encode_step2_rt_rl_correction_and_fq_transfering.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def main():
subprocess.call(cmd_wget,shell=True)
origin = os.path.join(encodetmdir,fq_url.rsplit('/',1)[1])
newname = os.path.join(fqdir,fields[0]+'.fastq.gz')
cmd_ln = 'ln -s '+ origin +' ' + newname
cmd_ln = 'ln -fs '+ origin +' ' + newname
print(cmd_ln)
subprocess.call(cmd_ln,shell=True)

Expand All @@ -77,7 +77,7 @@ def main():
subprocess.call(cmd_wget,shell=True)
origin = os.path.join(encodetmdir,fq_url.rsplit('/',1)[1])
newname = os.path.join(fqdir,fields[0]+'_R'+str(r1_or_r2)+'.fastq.gz')
cmd_ln = 'ln -s '+ origin +' ' + newname
cmd_ln = 'ln -sf '+ origin +' ' + newname
print(cmd_ln)
subprocess.call(cmd_ln,shell=True)
seq_info.read_length = str(read_length)
Expand Down
18 changes: 18 additions & 0 deletions utility/runSetQC.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,21 @@ ssh [email protected] $cmd2
#ver=$(ssh [email protected] $cmd)
#url="http://epigenomics.sdsc.edu:8088/${SET_ID}/$(cat ${SETQC_FILE/.txt/.rstr.txt})/setQC_report.html"
#python updateLibrariesSetQC.py -s '3' -url $url -v $ver -id $SET_ID


##################################################
## Step 4. (optional) delete ENCODE raw fastq files
##################################################
SEQ_DIR='/projects/ps-epigen/seqdata/'
libs=($(awk -v FS='\t' '(NR>1){print $1}' $STATUS_FILE))
for lib in ${libs[@]}
do
if [ $lib = "ENCODE_"* ]
then
echo $lib
for lib_link in ${SEQ_DIR}/${lib}.fastq.gz ${SEQ_DIR}/${lib}_R1.fastq.gz ${SEQ_DIR}/${lib}_R2.fastq.gz
do
[[ ! -z ${lib_link} ]] && rm "$(readlink -f $lib_link)"
done
fi
done
18 changes: 17 additions & 1 deletion utility/runSetQC_chipseq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ groups=($(awk '(NR>1){print $2}' $STATUS_FILE|uniq))
n_groups=${#groups[@]}
n_libs=$(awk -v FS='\t' 'BEGIN{n=0};{if(NR>1&&$6=="No") n=n+1}END{print n}' $STATUS_FILE)


## determine which pipeline to run
if [ $(grep -c True $STATUS_FILE) -eq 0 ]
then
Expand Down Expand Up @@ -86,3 +85,20 @@ ssh [email protected] $cmd2


#python updateLibrariesSetQC.py -s '3' -url $url -v $ver -id $SET_ID

##################################################
## Step 4. (optional) delete ENCODE raw fastq files
##################################################
SEQ_DIR='/projects/ps-epigen/seqdata/'
libs=($(awk -v FS='\t' '(NR>1){print $1}' $STATUS_FILE))
for lib in ${libs[@]}
do
if [ $lib = "ENCODE_"* ]
then
echo $lib
for lib_link in ${SEQ_DIR}/${lib}.fastq.gz ${SEQ_DIR}/${lib}_R1.fastq.gz ${SEQ_DIR}/${lib}_R2.fastq.gz
do
[[ ! -z ${lib_link} ]] && rm "$(readlink -f $lib_link)"
done
fi
done

0 comments on commit a438e14

Please sign in to comment.