#!/usr/bin/env python # coding: utf-8 # In[7]: cd /Volumes/Data/Sam/scratch/ # ###Quality trim & remove first 39bp from single FASTQ file # Code explanation: # # java -jar /usr/local/bioinformatics/Trimmomatic-0.30/trimmomatic-0.30.jar # This line above initiates Trimmomatic and uses the following arguments to specify order of execution: # # -single end reads (SE) # # -number of threads (-threads 16), # # -type of quality score (-phred33), # # -input file location (/Volumes/nightingales/C_gigas/2212_lane2_CTTGTA_L002_R1_001.fastq.gz), # # -output file name/location (20150506_trimmed_2212_lane2_CTTGTA_L002_R1_001.fastq.gz), # # -single end Illumina TruSeq adaptor trimming (ILLUMINACLIP:/usr/local/bioinformatics/Trimmomatic-0.30/adapters/TruSeq3-SE.fa:2:30:10), # # -cut number of bases at beginning of each read (HEADCROP:39) # # -cut number of bases at beginning of read if below quality threshold (LEADING:3) # # -cut number of bases at end of read if below quality threshold (TRAILING:3) # # -cut if average quality within 4 base window falls below 15 (SLIDINGWINDOW:4:15) # In[4]: get_ipython().run_cell_magic('bash', '', 'java -jar /usr/local/bioinformatics/Trimmomatic-0.30/trimmomatic-0.30.jar \\\nSE \\\n-threads 16 \\\n-phred33 \\\n/Volumes/nightingales/C_gigas/2212_lane2_CTTGTA_L002_R1_001.fastq.gz \\\n/Volumes/Data/Sam/scratch/20150506_trimmed_2212_lane2_CTTGTA_L002_R1_001.fastq.gz \\\nILLUMINACLIP:/usr/local/bioinformatics/Trimmomatic-0.30/adapters/TruSeq3-SE.fa:2:30:10 \\\nHEADCROP:39 \\\nLEADING:3 \\\nTRAILING:3 \\\nSLIDINGWINDOW:4:15\n') # ###FASTQC on trimmed file # In[5]: get_ipython().run_cell_magic('bash', '', 'fastqc /Volumes/Data/Sam/scratch/20150506_trimmed_2212_lane2_CTTGTA_L002_R1_001.fastq.gz \\\n--outdir=/Volumes/Eagle/Arabidopsis/\n') # ###Copy files to Eagle for web-based access # In[6]: cp 20150506_* /Volumes/Eagle/Arabidopsis/ # ###Unzip FASTQC output # In[12]: get_ipython().run_cell_magic('bash', '', 'unzip /Volumes/Eagle/Arabidopsis/20150506_trimmed_2212_lane2_CTTGTA_L002_R1_001_fastqc.zip\n') # ###Move unzipped folder to Eagle # In[13]: get_ipython().run_cell_magic('bash', '', 'mv 20150506_trimmed_2212_lane2_CTTGTA_L002_R1_001_fastqc/ /Volumes/Eagle/Arabidopsis/\n')