SEQanswers

Go Back   SEQanswers > Sequencing Technologies/Companies > Ion Torrent



Similar Threads
Thread Thread Starter Forum Replies Last Post
ion torrent proton QC problem zcm2403 Ion Torrent 7 02-09-2017 08:15 AM
Difference between Ion torrent proton and Ion PGM Bionerd Ion Torrent 7 09-30-2015 02:55 PM
Ion Torrent libraries on proton? Apex Ion Torrent 2 12-12-2012 07:33 AM
Ion Torrent $1000 Genome!? Benchtop Ion Proton Sequencer aeonsim Ion Torrent 88 10-28-2012 05:50 AM

Reply
 
Thread Tools
Old 08-22-2016, 12:58 AM   #1
zcm2403
Junior Member
 
Location: china

Join Date: Dec 2014
Posts: 9
Default ion torrent proton short reads contamination

i had ran a PI chip yesterday.And today i found that there was something wrong in the report.Just as shown in the pdf file,a short reads-about 30 bps was mixed into the final library.could anybody give me some suggestion about the origin of the short reads.Thanks!
Attached Files
File Type: pdf Auto_user_2456332-0519-237-IPF_chip7_343.pdf (893.7 KB, 14 views)
zcm2403 is offline   Reply With Quote
Old 08-23-2016, 11:44 AM   #2
r.rosati
Member
 
Location: Brazil

Join Date: Aug 2015
Posts: 42
Default

It might be spurious amplification... have you considered extracting those short-length reads from the BAM file, i.e. with a Python script, and see where they map?
r.rosati is offline   Reply With Quote
Old 08-23-2016, 01:18 PM   #3
r.rosati
Member
 
Location: Brazil

Join Date: Aug 2015
Posts: 42
Default

...for example, these are (humble) Python 3 scripts that use pysam, pandas and plotly:

first I would check the exact position of the short reads peak:

Code:
import pysam
import pandas as pd
from plotly.offline import plot
import plotly.graph_objs as go

bamfiles = ['IonXpress_003.bam',
            'IonXpress_004.bam',
            'IonXpress_007.bam',
            'IonXpress_005.bam'
            ]


# length_data will hold data counts for every bam file
length_data = []

# collect sequence length counts
for file in bamfiles:
    print("Reading file: " + file)
    bam = pysam.AlignmentFile(file, "rb")
    selected = bam.fetch()
    # alen = length of the aligned reference segment
    # qlen = length of the aligned read segment
    # rlen = length of the aligned read segment, including soft-clipped bases
    reads_xlen = [read.alen for read in selected]
    counts = [(i, reads_xlen.count(i)) for i in range(min(reads_xlen), max(reads_xlen))]
    length_data.append(pd.DataFrame(counts))

# create traces
data = [go.Scatter(x=bamdata[0], y=bamdata[1], mode = 'lines', name=bamfiles[i]) for i, bamdata in enumerate(length_data)]
    
# plot data
scatterplot = plot({'data': data})
See exactly at which nucleotide the peak is, and then check if there is any similarity within the most common sequences...

Code:
import pysam

# choose a file that contains the peak, select the peak position
file = 'IonXpress_004.bam'
peakpos = 29 # let's say the peak was at 29 bases

# retrieve all sequences from reads with the alignment length you specified
bam = pysam.AlignmentFile(file, "rb")
selected = bam.fetch()
reads = [read for read in selected if read.alen == peakpos]
reads_seq = [read.seq for read in reads]

# you can count them
print("Number of sequences retrieved:", len(reads_seq))

# see how many different entries you have
entries = set(reads_seq)
print("Number of different entries:", len(entries))

# categorize them
cat_entries = [(entry, reads_seq.count(entry)) for entry in entries]
cat_entries.sort(key = lambda x:x[1])

# print the 20 most common sequences
print('\nMost common sequences:')
print('[hits] sequence')
for i in range(20):
    print('[{0}] {1}'.format(cat_entries[i][1], cat_entries[i][0]))

Last edited by r.rosati; 08-23-2016 at 01:20 PM.
r.rosati is offline   Reply With Quote
Old 08-24-2016, 12:35 AM   #4
zcm2403
Junior Member
 
Location: china

Join Date: Dec 2014
Posts: 9
Default

Thanks for your help!I had send the bam files to the technical support.His anwser was that the short reads were primer dimers.He suggested us to optimize the experiment protocal.So we will improve the experiment pipeline and run one sample on the PGM to test the propose!
zcm2403 is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 06:02 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO