!date
Wed Apr 27 16:12:57 PDT 2016
%%bash
system_profiler SPSoftwareDataType
Software: System Software Overview: System Version: OS X 10.9.5 (13F34) Kernel Version: Darwin 13.4.0 Boot Volume: Hummingbird Boot Mode: Normal Computer Name: hummingbird User Name: Sam (Sam) Secure Virtual Memory: Enabled Time since boot: 9 days 6:19
%%bash
#Uses grep to exclude lines that display serial number and hardware UUID
system_profiler SPHardwareDataType | grep -v [SH][ea]
Model Name: Xserve Model Identifier: Xserve3,1 Processor Name: Quad-Core Intel Xeon Processor Speed: 2.26 GHz Number of Processors: 2 Total Number of Cores: 8 L2 Cache (per Core): 256 KB L3 Cache (per Processor): 8 MB Memory: 24 GB Processor Interconnect Speed: 5.86 GT/s Boot ROM Version: XS31.0081.B06 SMC Version (system): 1.43f4 LOM Revision: 1.1.8
%%bash
#For loop generates a md5 checksum has value for each file
#and appends the output to the checksums.md5 file.
time for file in /Volumes/owl_web/nightingales/O_lurida/20160223_gbs/160123_I132_FCH3YHMBBXX_L4_OYSzenG1AAD96FAAPEI-109_[12].fq.gz
do
md5 "$file" >> /Volumes/owl_web/nightingales/O_lurida/20160223_gbs/checksums.md5
done
real 12m58.000s user 1m44.985s sys 0m28.281s
%%bash
#Initializes variable.
totalreads=0
#For loop counts the lines in each file and divides them by four. This is performed because
#Illumina sequencing files are composed of four lines per read.
#A running total of the total number of reads is generated [totalreads=$((readcount+totalreads))]
#and is printed after the for loop completes.
#Format the output (printf) to print the filename, followed by a tab, followed by the readcount.
#The command "tee -a" is used to both print the output to the screen and append the output to the readme.md file.
time for file in /Volumes/owl_web/nightingales/O_lurida/20160223_gbs/160123_I132_FCH3YHMBBXX_L4_OYSzenG1AAD96FAAPEI-109_[12].fq.gz
do linecount=`gunzip -c "$file" | wc -l`
readcount=$((linecount/4))
totalreads=$((readcount+totalreads))
printf "%s\t%s\n\n" "${file##*/}" "$readcount" | tee -a /Volumes/owl_web/nightingales/O_lurida/20160223_gbs/readme.md
done
echo $totalreads
160123_I132_FCH3YHMBBXX_L4_OYSzenG1AAD96FAAPEI-109_1.fq.gz 364261046 160123_I132_FCH3YHMBBXX_L4_OYSzenG1AAD96FAAPEI-109_2.fq.gz 364261046 728522092
real 29m40.999s user 18m34.488s sys 1m58.738s