Last active
March 6, 2018 23:20
-
-
Save johnsolk/f2783ab31b3f9e1fd8aa13ecbc2f77b2 to your computer and use it in GitHub Desktop.
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
# makes all files read only | |
chmod -w * | |
# renames files with underscores | |
for i in *.fastq; do j=$(echo $i | cut -d_ -f1-3 ); k=$(echo $i | cut -d_ -f5); echo mv $i "$j-$k"; done | |
# adds pwd to $PATH in .bashrc | |
echo export PATH=$(pwd):$PATH >> ~/.bashrc | |
# renames files | |
for file in *.Trinity.fasta | |
do | |
echo mv $file ${file/.trinity_out_2.2.0.Trinity.fasta/} | |
done | |
# loop through a set of directories and do stuff: | |
for f in $(find . -name 'interleave_MMETSP*.qsub.o*'); do ls $f; done | |
# cp and rename files based on directory name | |
for i in $(ls); do echo $i; done | |
for i in */fastqc_report.html; do echo "$i" ${i/fastqc_report.html}"${i%/*}".html; done | |
for i in */*.html; do echo "*" http://htmlpreview.github.io/?https://github.com/ljcohen/osmotic/blob/master/evaluation_data/fastqc/$i; done | |
#to kill only specific jobs in the queue | |
#msu hpcc | |
qstat -u ljcohen | grep "472" | cut -d "." -f1 | xargs qdel | |
#ucd farm | |
squeue -u ljcohen | grep “104517" | sed -r -e "s/[\t\ ]+/./g" | cut -d"." -f 2 | xargs scancel | |
# top barcodes in unaligned | |
zcat /ifs/data/sequence/Illumina/production/150501_D00372_0283_BC6UELANXX_Combo_HSQ_59/Data/Intensities/BaseCalls/Unaligned_lanes1-3_5-6/Undetermined_indices/Sample_lane6/lane6_Undetermined_L006_R1_001.fastq.gz | head -400000 | grep '^@HWI' | cut -d : -f 10 | sort | uniq -c | sort -nr | head -20 | |
# list all files and combine all files with same prefix | |
for i in $(ls | cut -d "_" -f 1,2) | |
do | |
echo $i*_R1* | |
echo $i*_R2* | |
done | |
# zip files: | |
zip mmetsp_dib_annotated_fasta.zip fasta/*.fasta | |
zip mmetsp_dib_annotated_gff.zip gff/*.gff | |
# find only empty files: | |
find ~ -empty -type f | wc -l |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment