
cd "/Volumes/NGS 2TB/160707_Biomass/6 dereplicate"


cat BP_rerun_L001_BF10_BR14_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BF10_BR24_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BF11_BR13_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BF11_BR23_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BF12_BR12_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BF12_BR22_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BF13_BR11_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BF13_BR21_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BF14_BR10_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BF14_BR20_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BF20_BR14_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BF20_BR24_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BF21_BR13_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BF21_BR23_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BF22_BR12_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BF22_BR22_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BF23_BR11_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BF23_BR21_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BF24_BR10_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BF24_BR20_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BR10_BF14_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BR10_BF24_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BR11_BF13_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BR11_BF23_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BR12_BF12_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BR12_BF22_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BR13_BF11_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BR13_BF21_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BR14_BF10_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BR14_BF20_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BR20_BF14_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BR20_BF24_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BR21_BF13_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BR21_BF23_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BR22_BF12_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BR22_BF22_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BR23_BF11_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BR23_BF21_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BR24_BF10_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L001_BR24_BF20_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BF10_BR14_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BF10_BR24_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BF11_BR13_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BF11_BR23_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BF12_BR12_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BF12_BR22_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BF13_BR11_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BF13_BR21_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BF14_BR10_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BF14_BR20_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BF20_BR14_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BF20_BR24_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BF21_BR13_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BF21_BR23_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BF22_BR12_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BF22_BR22_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BF23_BR11_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BF23_BR21_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BF24_BR10_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BF24_BR20_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BR10_BF14_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BR10_BF24_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BR11_BF13_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BR11_BF23_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BR12_BF12_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BR12_BF22_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BR13_BF11_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BR13_BF21_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BR14_BF10_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BR14_BF20_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BR20_BF14_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BR20_BF24_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BR21_BF13_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BR21_BF23_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BR22_BF12_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BR22_BF22_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BR23_BF11_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BR23_BF21_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BR24_BF10_merged_cut_trunc_minmax_RC_maxee_derep.txt BP_rerun_L002_BR24_BF20_merged_cut_trunc_minmax_RC_maxee_derep.txt > "../7 OTU/all_sorting.txt"



cd "/Volumes/NGS 2TB/160707_Biomass/7 OTU"

Vsearch -derep_fulllength "all_sorting.txt" -output "all_sorting_derep.txt" -sizein -sizeout

Vsearch -derep_fulllength "all_sorting_derep.txt" -output "all_sorting_derep_min2.txt" -sizein -sizeout -minuniquesize 2

Vsearch -derep_fulllength "all_sorting_derep.txt" -output "all_sorting_derep_min3.txt" -sizein -sizeout -minuniquesize 3


# LOG - 160711

dhcp-ce234230:6 dereplicate luckylion$ cd "/Volumes/NGS 2TB/160707_Biomass/7 OTU"
dhcp-ce234230:7 OTU luckylion$ 
dhcp-ce234230:7 OTU luckylion$ Vsearch -derep_fulllength "all_sorting.txt" -output "all_sorting_derep.txt" -sizein -sizeout
vsearch v1.11.1_osx_x86_64, 16.0GB RAM, 8 cores
https://github.com/torognes/vsearch

Reading file all_sorting.txt 100%  
2916793725 nt in 13465784 seqs, min 207, max 227, avg 217
Dereplicating 100%  
Sorting 100%
7181993 unique sequences, avg cluster 20.3, median 1, max 13181379
Writing output file 100%  
dhcp-ce234230:7 OTU luckylion$ 
dhcp-ce234230:7 OTU luckylion$ Vsearch -derep_fulllength "all_sorting_derep.txt" -output "all_sorting_derep_min2.txt" -sizein -sizeout -minuniquesize 2
vsearch v1.11.1_osx_x86_64, 16.0GB RAM, 8 cores
https://github.com/torognes/vsearch

Reading file all_sorting_derep.txt 100%  
1555505506 nt in 7181993 seqs, min 207, max 227, avg 217
Dereplicating 100%  
Sorting 100%
7181993 unique sequences, avg cluster 20.3, median 1, max 13181379
Writing output file 100%  
1768322 uniques written, 5413671 clusters discarded (75.4%)
dhcp-ce234230:7 OTU luckylion$ 
dhcp-ce234230:7 OTU luckylion$ Vsearch -derep_fulllength "all_sorting_derep.txt" -output "all_sorting_derep_min3.txt" -sizein -sizeout -minuniquesize 3
vsearch v1.11.1_osx_x86_64, 16.0GB RAM, 8 cores
https://github.com/torognes/vsearch

Reading file all_sorting_derep.txt 100%  
1555505506 nt in 7181993 seqs, min 207, max 227, avg 217
Dereplicating 100%  
Sorting 100%
7181993 unique sequences, avg cluster 20.3, median 1, max 13181379
Writing output file 100%  
1053980 uniques written, 6128013 clusters discarded (85.3%)
dhcp-ce234230:7 OTU luckylion$ 






# usearch clustering!
# 160712


cd "/Volumes/NGS 2TB/160707_Biomass/7 OTU"

# USED ###
##########
usearch -cluster_otus all_sorting_derep_min3.txt -otus all_sorting_derep_min3_OTU.txt -uparseout all_sorting_derep_min3_OUTtab.txt -relabel OTU_ -sizein -sizeout -otu_radius_pct 3 -strand plus


dhcp-ce234230:7 OTU luckylion$ usearch -cluster_otus all_sorting_derep_min3.txt -otus all_sorting_derep_min3_OTU.txt -uparseout all_sorting_derep_min3_OUTtab.txt -relabel OTU_ -sizein -sizeout -otu_radius_pct 3 -strand plus
usearch v8.1.1861_i86osx32, 4.0Gb RAM (17.2Gb total), 8 cores
(C) Copyright 2013-15 Robert C. Edgar, all rights reserved.
http://drive5.com/usearch

Licensed to: luckylion07@googlemail.com

02:04  55Mb  100.0% 6141 OTUs, 11186 chimeras (1.1%)
dhcp-ce234230:7 OTU luckylion$ 


##########
##########
##########


cd "/Volumes/NGS 2TB/160707_Biomass/7 OTU"


usearch -cluster_otus all_sorting_derep_min2.txt -otus all_sorting_derep_min2_OTU.txt -uparseout all_sorting_derep_min2_OUTtab.txt -relabel OTU_ -sizein -sizeout -otu_radius_pct 3 -strand plus


dhcp-ce234230:7 OTU luckylion$ usearch -cluster_otus all_sorting_derep_min2.txt -otus all_sorting_derep_min2_OTU.txt -uparseout all_sorting_derep_min2_OUTtab.txt -relabel OTU_ -sizein -sizeout -otu_radius_pct 3 -strand plus
usearch v8.1.1861_i86osx32, 4.0Gb RAM (17.2Gb total), 8 cores
(C) Copyright 2013-15 Robert C. Edgar, all rights reserved.
http://drive5.com/usearch

Licensed to: luckylion07@googlemail.com

03:48  58Mb  100.0% 7485 OTUs, 20665 chimeras (1.2%)



# 160712 - test with min 4

cd "/Volumes/NGS 2TB/160707_Biomass/7 OTU"

Vsearch -derep_fulllength "all_sorting_derep.txt" -output "all_sorting_derep_min4.txt" -sizein -sizeout -minuniquesize 4

usearch -cluster_otus all_sorting_derep_min4.txt -otus all_sorting_derep_min4_OTU.txt -uparseout all_sorting_derep_min4_OUTtab.txt -relabel OTU_ -sizein -sizeout -otu_radius_pct 3 -strand plus




dhcp-ce234230:~ luckylion$ 
dhcp-ce234230:~ luckylion$ cd "/Volumes/NGS 2TB/160707_Biomass/7 OTU"
dhcp-ce234230:7 OTU luckylion$ 
dhcp-ce234230:7 OTU luckylion$ Vsearch -derep_fulllength "all_sorting_derep.txt" -output "all_sorting_derep_min4.txt" -sizein -sizeout -minuniquesize 4
vsearch v1.11.1_osx_x86_64, 16.0GB RAM, 8 cores
https://github.com/torognes/vsearch

Reading file all_sorting_derep.txt 100%  
1555505506 nt in 7181993 seqs, min 207, max 227, avg 217
Dereplicating 100%  
Sorting 100%
7181993 unique sequences, avg cluster 20.3, median 1, max 13181379
Writing output file 100%  
761505 uniques written, 6420488 clusters discarded (89.4%)
dhcp-ce234230:7 OTU luckylion$ 
dhcp-ce234230:7 OTU luckylion$ usearch -cluster_otus all_sorting_derep_min4.txt -otus all_sorting_derep_min4_OTU.txt -uparseout all_sorting_derep_min4_OUTtab.txt -relabel OTU_ -sizein -sizeout -otu_radius_pct 3 -strand plus
usearch v8.1.1861_i86osx32, 4.0Gb RAM (17.2Gb total), 8 cores
(C) Copyright 2013-15 Robert C. Edgar, all rights reserved.
http://drive5.com/usearch

Licensed to: luckylion07@googlemail.com

01:16  52Mb  100.0% 5266 OTUs, 7868 chimeras (1.0%)
dhcp-ce234230:7 OTU luckylion$ 
dhcp-ce234230:7 OTU luckylion$ 



cd "/Volumes/NGS 2TB/160707_Biomass/7 OTU"

Vsearch -derep_fulllength "all_sorting_derep.txt" -output "all_sorting_derep_min10.txt" -sizein -sizeout -minuniquesize 10

usearch -cluster_otus all_sorting_derep_min10.txt -otus all_sorting_derep_min10_OTU.txt -uparseout all_sorting_derep_min10_OUTtab.txt -relabel OTU_ -sizein -sizeout -otu_radius_pct 3 -strand plus


dhcp-ce234230:7 OTU luckylion$ cd "/Volumes/NGS 2TB/160707_Biomass/7 OTU"
dhcp-ce234230:7 OTU luckylion$ 
dhcp-ce234230:7 OTU luckylion$ Vsearch -derep_fulllength "all_sorting_derep.txt" -output "all_sorting_derep_min10.txt" -sizein -sizeout -minuniquesize 10
vsearch v1.11.1_osx_x86_64, 16.0GB RAM, 8 cores
https://github.com/torognes/vsearch

Reading file all_sorting_derep.txt 100%  
1555505506 nt in 7181993 seqs, min 207, max 227, avg 217
Dereplicating 100%  
Sorting 100%
7181993 unique sequences, avg cluster 20.3, median 1, max 13181379
Writing output file 100%  
308933 uniques written, 6873060 clusters discarded (95.7%)
dhcp-ce234230:7 OTU luckylion$ 
dhcp-ce234230:7 OTU luckylion$ usearch -cluster_otus all_sorting_derep_min10.txt -otus all_sorting_derep_min10_OTU.txt -uparseout all_sorting_derep_min10_OUTtab.txt -relabel OTU_ -sizein -sizeout -otu_radius_pct 3 -strand plus
usearch v8.1.1861_i86osx32, 4.0Gb RAM (17.2Gb total), 8 cores
(C) Copyright 2013-15 Robert C. Edgar, all rights reserved.
http://drive5.com/usearch

Licensed to: luckylion07@googlemail.com

00:27  47Mb  100.0% 3131 OTUs, 3073 chimeras (1.0%)
dhcp-ce234230:7 OTU luckylion$ 
dhcp-ce234230:7 OTU luckylion$ 




