%%bash
date
Thu Apr 28 10:05:32 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: 10 days 11 minutes
%%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
cd /Volumes/toaster/sam/scratch/20160428_Oly_GBS_stacks/
/Volumes/toaster/sam/scratch/20160428_Oly_GBS_stacks
%%bash
echo *_1.fq.gz
1HL_10A_1.fq.gz 1HL_11A_1.fq.gz 1HL_12A_1.fq.gz 1HL_13A_1.fq.gz 1HL_14A_1.fq.gz 1HL_15A_1.fq.gz 1HL_16A_1.fq.gz 1HL_17A_1.fq.gz 1HL_19A_1.fq.gz 1HL_1A_1.fq.gz 1HL_20A_1.fq.gz 1HL_21A_1.fq.gz 1HL_22A_1.fq.gz 1HL_23A_1.fq.gz 1HL_24A_1.fq.gz 1HL_25A_1.fq.gz 1HL_26A_1.fq.gz 1HL_27A_1.fq.gz 1HL_28A_1.fq.gz 1HL_29A_1.fq.gz 1HL_2A_1.fq.gz 1HL_31A_1.fq.gz 1HL_33A_1.fq.gz 1HL_34A_1.fq.gz 1HL_35A_1.fq.gz 1HL_3A_1.fq.gz 1HL_4A_1.fq.gz 1HL_5A_1.fq.gz 1HL_6A_1.fq.gz 1HL_7A_1.fq.gz 1HL_8A_1.fq.gz 1HL_9A_1.fq.gz 1NF_10A_1.fq.gz 1NF_11A_1.fq.gz 1NF_12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z 1SN_19A_2.fq.gz 1SN_1A_2.fq.gz 1SN_20A_2.fq.gz 1SN_21A_2.fq.gz 1SN_22A_2.fq.gz 1SN_23A_2.fq.gz 1SN_24A_2.fq.gz 1SN_25A_2.fq.gz 1SN_26A_2.fq.gz 1SN_27A_2.fq.gz 1SN_28A_2.fq.gz 1SN_29A_2.fq.gz 1SN_2A_2.fq.gz 1SN_30A_2.fq.gz 1SN_31A_2.fq.gz 1SN_32A_2.fq.gz 1SN_3A_2.fq.gz 1SN_4A_2.fq.gz 1SN_5A_2.fq.gz 1SN_6A_2.fq.gz 1SN_7A_2.fq.gz 1SN_8A_2.fq.gz 1SN_9A_2.fq.gz UnKnow_2.fq.gz
process_radtags
component¶process_radtags
command for matching the paired FASTQ files.¶%%bash
seq1=( 1HL_10A_1.fq.gz 1HL_11A_1.fq.gz 1HL_12A_1.fq.gz 1HL_13A_1.fq.gz 1HL_14A_1.fq.gz 1HL_15A_1.fq.gz 1HL_16A_1.fq.gz 1HL_17A_1.fq.gz 1HL_19A_1.fq.gz 1HL_1A_1.fq.gz 1HL_20A_1.fq.gz 1HL_21A_1.fq.gz 1HL_22A_1.fq.gz 1HL_23A_1.fq.gz 1HL_24A_1.fq.gz 1HL_25A_1.fq.gz 1HL_26A_1.fq.gz 1HL_27A_1.fq.gz 1HL_28A_1.fq.gz 1HL_29A_1.fq.gz 1HL_2A_1.fq.gz 1HL_31A_1.fq.gz 1HL_33A_1.fq.gz 1HL_34A_1.fq.gz 1HL_35A_1.fq.gz 1HL_3A_1.fq.gz 1HL_4A_1.fq.gz 1HL_5A_1.fq.gz 1HL_6A_1.fq.gz 1HL_7A_1.fq.gz 1HL_8A_1.fq.gz 1HL_9A_1.fq.gz 1NF_10A_1.fq.gz 1NF_11A_1.fq.gz 1NF_12A_1.fq.gz 1NF_13A_1.fq.gz 1NF_14A_1.fq.gz 1NF_15A_1.fq.gz 1NF_16A_1.fq.gz 1NF_17A_1.fq.gz 1NF_18A_1.fq.gz 1NF_19A_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.fq.gz 1SN_27A_2.fq.gz 1SN_28A_2.fq.gz 1SN_29A_2.fq.gz 1SN_2A_2.fq.gz 1SN_30A_2.fq.gz 1SN_31A_2.fq.gz 1SN_32A_2.fq.gz 1SN_3A_2.fq.gz 1SN_4A_2.fq.gz 1SN_5A_2.fq.gz 1SN_6A_2.fq.gz 1SN_7A_2.fq.gz 1SN_8A_2.fq.gz 1SN_9A_2.fq.gz )
time for pair in "${!seq1[@]}"; do
i=${seq1[$pair]}
j=${seq2[$pair]}
/usr/local/bioinformatics/stacks-1.37/process_radtags \
-1 $i \
-2 $j \
-o /Volumes/toaster/sam/scratch/20160428_Oly_GBS_stacks/ \
-e apeKI \
-c \
-q \
-i gzfastq \
>>radtags.stdout 2>>radtags.stderr
done
real 386m2.612s user 381m30.306s sys 2m20.472s
process_radtags
output files into single FASTQ file¶
%%bash
list1=( 1HL_10A_1.1.fq.gz 1HL_11A_1.1.fq.gz 1HL_12A_1.1.fq.gz 1HL_13A_1.1.fq.gz 1HL_14A_1.1.fq.gz 1HL_15A_1.1.fq.gz 1HL_16A_1.1.fq.gz 1HL_17A_1.1.fq.gz 1HL_19A_1.1.fq.gz 1HL_1A_1.1.fq.gz 1HL_20A_1.1.fq.gz 1HL_21A_1.1.fq.gz 1HL_22A_1.1.fq.gz 1HL_23A_1.1.fq.gz 1HL_24A_1.1.fq.gz 1HL_25A_1.1.fq.gz 1HL_26A_1.1.fq.gz 1HL_27A_1.1.fq.gz 1HL_28A_1.1.fq.gz 1HL_29A_1.1.fq.gz 1HL_2A_1.1.fq.gz 1HL_31A_1.1.fq.gz 1HL_33A_1.1.fq.gz 1HL_34A_1.1.fq.gz 1HL_35A_1.1.fq.gz 1HL_3A_1.1.fq.gz 1HL_4A_1.1.fq.gz 1HL_5A_1.1.fq.gz 1HL_6A_1.1.fq.gz 1HL_7A_1.1.fq.gz 1HL_8A_1.1.fq.gz 1HL_9A_1.1.fq.gz 1NF_10A_1.1.fq.gz 1NF_11A_1.1.fq.gz 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1SN_21A_2.rem.2.fq.gz 1SN_22A_2.rem.2.fq.gz 1SN_23A_2.rem.2.fq.gz 1SN_24A_2.rem.2.fq.gz 1SN_25A_2.rem.2.fq.gz 1SN_26A_2.rem.2.fq.gz 1SN_27A_2.rem.2.fq.gz 1SN_28A_2.rem.2.fq.gz 1SN_29A_2.rem.2.fq.gz 1SN_2A_2.rem.2.fq.gz 1SN_30A_2.rem.2.fq.gz 1SN_31A_2.rem.2.fq.gz 1SN_32A_2.rem.2.fq.gz 1SN_3A_2.rem.2.fq.gz 1SN_4A_2.rem.2.fq.gz 1SN_5A_2.rem.2.fq.gz 1SN_6A_2.rem.2.fq.gz 1SN_7A_2.rem.2.fq.gz 1SN_8A_2.rem.2.fq.gz 1SN_9A_2.rem.2.fq.gz )
time for index in "${!list1[@]}"; do
i=${list1[$index]}
j=${list2[$index]}
k=${list3[$index]}
l=${list4[$index]}
cat $i $j $k $l > ${i/_1.1/}
done
real 22m35.250s user 0m2.167s sys 1m28.419s
%%bash
echo *A.fq.gz
1HL_10A.fq.gz 1HL_11A.fq.gz 1HL_12A.fq.gz 1HL_13A.fq.gz 1HL_14A.fq.gz 1HL_15A.fq.gz 1HL_16A.fq.gz 1HL_17A.fq.gz 1HL_19A.fq.gz 1HL_1A.fq.gz 1HL_20A.fq.gz 1HL_21A.fq.gz 1HL_22A.fq.gz 1HL_23A.fq.gz 1HL_24A.fq.gz 1HL_25A.fq.gz 1HL_26A.fq.gz 1HL_27A.fq.gz 1HL_28A.fq.gz 1HL_29A.fq.gz 1HL_2A.fq.gz 1HL_31A.fq.gz 1HL_33A.fq.gz 1HL_34A.fq.gz 1HL_35A.fq.gz 1HL_3A.fq.gz 1HL_4A.fq.gz 1HL_5A.fq.gz 1HL_6A.fq.gz 1HL_7A.fq.gz 1HL_8A.fq.gz 1HL_9A.fq.gz 1NF_10A.fq.gz 1NF_11A.fq.gz 1NF_12A.fq.gz 1NF_13A.fq.gz 1NF_14A.fq.gz 1NF_15A.fq.gz 1NF_16A.fq.gz 1NF_17A.fq.gz 1NF_18A.fq.gz 1NF_19A.fq.gz 1NF_1A.fq.gz 1NF_20A.fq.gz 1NF_21A.fq.gz 1NF_22A.fq.gz 1NF_23A.fq.gz 1NF_24A.fq.gz 1NF_25A.fq.gz 1NF_26A.fq.gz 1NF_27A.fq.gz 1NF_28A.fq.gz 1NF_29A.fq.gz 1NF_2A.fq.gz 1NF_30A.fq.gz 1NF_31A.fq.gz 1NF_32A.fq.gz 1NF_33A.fq.gz 1NF_4A.fq.gz 1NF_5A.fq.gz 1NF_6A.fq.gz 1NF_7A.fq.gz 1NF_8A.fq.gz 1NF_9A.fq.gz 1SN_10A.fq.gz 1SN_11A.fq.gz 1SN_12A.fq.gz 1SN_13A.fq.gz 1SN_14A.fq.gz 1SN_15A.fq.gz 1SN_16A.fq.gz 1SN_17A.fq.gz 1SN_18A.fq.gz 1SN_19A.fq.gz 1SN_1A.fq.gz 1SN_20A.fq.gz 1SN_21A.fq.gz 1SN_22A.fq.gz 1SN_23A.fq.gz 1SN_24A.fq.gz 1SN_25A.fq.gz 1SN_26A.fq.gz 1SN_27A.fq.gz 1SN_28A.fq.gz 1SN_29A.fq.gz 1SN_2A.fq.gz 1SN_30A.fq.gz 1SN_31A.fq.gz 1SN_32A.fq.gz 1SN_3A.fq.gz 1SN_4A.fq.gz 1SN_5A.fq.gz 1SN_6A.fq.gz 1SN_7A.fq.gz 1SN_8A.fq.gz 1SN_9A.fq.gz
%%bash
#Runs ustacks and appends sql ID to each file for downstream analysis.
sql_id=0
time for i in *A.fq.gz; do
((sql_id++))
/usr/local/bioinformatics/stacks-1.37/ustacks \
-t gzfastq \
-f $i \
-o /Volumes/toaster/sam/scratch/20160428_Oly_GBS_stacks/stacks/ \
-i $sql_id \
-d \
-r \
-p 16
done
cd /Volumes/toaster/sam/scratch/20160428_Oly_GBS_stacks/stacks/
/Volumes/toaster/sam/scratch/20160428_Oly_GBS_stacks/stacks
%%bash
#Uses printf statement to print just the first part of each filename, without the extension, and ads a "-s" and a " \"
#to each line for use in the subsequent cstacks command.
for fname in *; do printf " %s\n" "-s ${fname%%.*} \\" >> tmp.txt; done
cat tmp.txt | uniq
rm tmp.txt
-s 1HL_10A \ -s 1HL_11A \ -s 1HL_12A \ -s 1HL_13A \ -s 1HL_14A \ -s 1HL_15A \ -s 1HL_16A \ -s 1HL_17A \ -s 1HL_19A \ -s 1HL_1A \ -s 1HL_20A \ -s 1HL_21A \ -s 1HL_22A \ -s 1HL_23A \ -s 1HL_24A \ -s 1HL_25A \ -s 1HL_26A \ -s 1HL_27A \ -s 1HL_28A \ -s 1HL_29A \ -s 1HL_2A \ -s 1HL_31A \ -s 1HL_33A \ -s 1HL_34A \ -s 1HL_35A \ -s 1HL_3A \ -s 1HL_4A \ -s 1HL_5A \ -s 1HL_6A \ -s 1HL_7A \ -s 1HL_8A \ -s 1HL_9A \ -s 1NF_10A \ -s 1NF_11A \ -s 1NF_12A \ -s 1NF_13A \ -s 1NF_14A \ -s 1NF_15A \ -s 1NF_16A \ -s 1NF_17A \ -s 1NF_18A \ -s 1NF_19A \ -s 1NF_1A \ -s 1NF_20A \ -s 1NF_21A \ -s 1NF_22A \ -s 1NF_23A \ -s 1NF_24A \ -s 1NF_25A \ -s 1NF_26A \ -s 1NF_27A \ -s 1NF_28A \ -s 1NF_29A \ -s 1NF_2A \ -s 1NF_30A \ -s 1NF_31A \ -s 1NF_32A \ -s 1NF_33A \ -s 1NF_4A \ -s 1NF_5A \ -s 1NF_6A \ -s 1NF_7A \ -s 1NF_8A \ -s 1NF_9A \ -s 1SN_10A \ -s 1SN_11A \ -s 1SN_12A \ -s 1SN_13A \ -s 1SN_14A \ -s 1SN_15A \ -s 1SN_16A \ -s 1SN_17A \ -s 1SN_18A \ -s 1SN_19A \ -s 1SN_1A \ -s 1SN_20A \ -s 1SN_21A \ -s 1SN_22A \ -s 1SN_23A \ -s 1SN_24A \ -s 1SN_25A \ -s 1SN_26A \ -s 1SN_27A \ -s 1SN_28A \ -s 1SN_29A \ -s 1SN_2A \ -s 1SN_30A \ -s 1SN_31A \ -s 1SN_32A \ -s 1SN_3A \
%%bash
#cstacks command.
time /usr/local/bioinformatics/stacks-1.37/cstacks -b 1 -o . \
-p 16 \
-s 1HL_10A \
-s 1HL_11A \
-s 1HL_12A \
-s 1HL_13A \
-s 1HL_14A \
-s 1HL_15A \
-s 1HL_16A \
-s 1HL_17A \
-s 1HL_19A \
-s 1HL_1A \
-s 1HL_20A \
-s 1HL_21A \
-s 1HL_22A \
-s 1HL_23A \
-s 1HL_24A \
-s 1HL_25A \
-s 1HL_26A \
-s 1HL_27A \
-s 1HL_28A \
-s 1HL_29A \
-s 1HL_2A \
-s 1HL_31A \
-s 1HL_33A \
-s 1HL_34A \
-s 1HL_35A \
-s 1HL_3A \
-s 1HL_4A \
-s 1HL_5A \
-s 1HL_6A \
-s 1HL_7A \
-s 1HL_8A \
-s 1HL_9A \
-s 1NF_10A \
-s 1NF_11A \
-s 1NF_12A \
-s 1NF_13A \
-s 1NF_14A \
-s 1NF_15A \
-s 1NF_16A \
-s 1NF_17A \
-s 1NF_18A \
-s 1NF_19A \
-s 1NF_1A \
-s 1NF_20A \
-s 1NF_21A \
-s 1NF_22A \
-s 1NF_23A \
-s 1NF_24A \
-s 1NF_25A \
-s 1NF_26A \
-s 1NF_27A \
-s 1NF_28A \
-s 1NF_29A \
-s 1NF_2A \
-s 1NF_30A \
-s 1NF_31A \
-s 1NF_32A \
-s 1NF_33A \
-s 1NF_4A \
-s 1NF_5A \
-s 1NF_6A \
-s 1NF_7A \
-s 1NF_8A \
-s 1NF_9A \
-s 1SN_10A \
-s 1SN_11A \
-s 1SN_12A \
-s 1SN_13A \
-s 1SN_14A \
-s 1SN_15A \
-s 1SN_16A \
-s 1SN_17A \
-s 1SN_18A \
-s 1SN_19A \
-s 1SN_1A \
-s 1SN_20A \
-s 1SN_21A \
-s 1SN_22A \
-s 1SN_23A \
-s 1SN_24A \
-s 1SN_25A \
-s 1SN_26A \
-s 1SN_27A \
-s 1SN_28A \
-s 1SN_29A \
-s 1SN_2A \
-s 1SN_30A \
-s 1SN_31A \
-s 1SN_32A \
-s 1SN_3A
Number of mismatches allowed between stacks: 1 Loci matched based on sequence identity. Constructing catalog from 90 samples. Initializing new catalog... Parsing 1HL_10A.tags.tsv.gz Parsing 1HL_10A.snps.tsv.gz Parsing 1HL_10A.alleles.tsv.gz Processing sample 1HL_10A [2 of 90] Parsing 1HL_11A.tags.tsv.gz Parsing 1HL_11A.snps.tsv.gz Parsing 1HL_11A.alleles.tsv.gz Searching for sequence matches... Distance allowed between stacks: 1 Using a k-mer length of 49 Number of kmers per sequence: 52 Minimum number of k-mers to define a match: 3 206709 loci in the catalog, 9475033 kmers in the catalog hash. Merging matches into catalog... 19048 loci matched more than one catalog locus and were excluded. Processing sample 1HL_11A [3 of 90] Parsing 1HL_12A.tags.tsv.gz Parsing 1HL_12A.snps.tsv.gz Parsing 1HL_12A.alleles.tsv.gz Searching for sequence matches... Distance allowed between stacks: 1 Using a k-mer length of 49 Number of kmers per sequence: 52 Minimum number of k-mers to define a match: 3 304949 loci in the catalog, 14156292 kmers in the catalog hash. Merging matches into catalog... 16397 loci matched more than one catalog locus and were excluded. Processing sample 1HL_12A [4 of 90] Parsing 1HL_13A.tags.tsv.gz Parsing 1HL_13A.snps.tsv.gz Error parsing 1HL_13A.snps.tsv.gz at line: 36196. SNP asks for nonexistent locus with ID: 116506 Failed to load sample 4 Processing sample 1HL_13A [4 of 90] Parsing 1HL_14A.tags.tsv.gz Parsing 1HL_14A.snps.tsv.gz Error parsing 1HL_14A.snps.tsv.gz at line: 31291. SNP asks for nonexistent locus with ID: 116883 Failed to load sample 4 Processing sample 1HL_14A [4 of 90] Parsing 1HL_15A.tags.tsv.gz Parsing 1HL_15A.snps.tsv.gz Parsing 1HL_15A.alleles.tsv.gz Searching for sequence matches... Distance allowed between stacks: 1 Using a k-mer length of 49 Number of kmers per sequence: 52 Minimum number of k-mers to define a match: 3 368906 loci in the catalog, 17317529 kmers in the catalog hash. Merging matches into catalog... 17807 loci matched more than one catalog locus and were excluded. Processing sample 1HL_15A [5 of 90] Parsing 1HL_16A.tags.tsv.gz Parsing 1HL_16A.snps.tsv.gz Parsing 1HL_16A.alleles.tsv.gz Searching for sequence matches... bash: line 93: 83337 Segmentation fault: 11 /usr/local/bioinformatics/stacks-1.37/cstacks -b 1 -o . -p 16 -s 1HL_10A -s 1HL_11A -s 1HL_12A -s 1HL_13A -s 1HL_14A -s 1HL_15A -s 1HL_16A -s 1HL_17A -s 1HL_19A -s 1HL_1A -s 1HL_20A -s 1HL_21A -s 1HL_22A -s 1HL_23A -s 1HL_24A -s 1HL_25A -s 1HL_26A -s 1HL_27A -s 1HL_28A -s 1HL_29A -s 1HL_2A -s 1HL_31A -s 1HL_33A -s 1HL_34A -s 1HL_35A -s 1HL_3A -s 1HL_4A -s 1HL_5A -s 1HL_6A -s 1HL_7A -s 1HL_8A -s 1HL_9A -s 1NF_10A -s 1NF_11A -s 1NF_12A -s 1NF_13A -s 1NF_14A -s 1NF_15A -s 1NF_16A -s 1NF_17A -s 1NF_18A -s 1NF_19A -s 1NF_1A -s 1NF_20A -s 1NF_21A -s 1NF_22A -s 1NF_23A -s 1NF_24A -s 1NF_25A -s 1NF_26A -s 1NF_27A -s 1NF_28A -s 1NF_29A -s 1NF_2A -s 1NF_30A -s 1NF_31A -s 1NF_32A -s 1NF_33A -s 1NF_4A -s 1NF_5A -s 1NF_6A -s 1NF_7A -s 1NF_8A -s 1NF_9A -s 1SN_10A -s 1SN_11A -s 1SN_12A -s 1SN_13A -s 1SN_14A -s 1SN_15A -s 1SN_16A -s 1SN_17A -s 1SN_18A -s 1SN_19A -s 1SN_1A -s 1SN_20A -s 1SN_21A -s 1SN_22A -s 1SN_23A -s 1SN_24A -s 1SN_25A -s 1SN_26A -s 1SN_27A -s 1SN_28A -s 1SN_29A -s 1SN_2A -s 1SN_30A -s 1SN_31A -s 1SN_32A -s 1SN_3A real 5m56.645s user 5m44.765s sys 0m10.503s