Error with constructBin

82 views
Skip to first unread message

John

unread,
Jun 15, 2015, 11:03:57 AM6/15/15
to mosaics_u...@googlegroups.com
Hi there,

I'm having an issue at the very start producing my bin files.  I'm quite unfamiliar with R/new to this kind of work which i imagine is my issue.

I've tried using the command set:

constructBins( infile="/Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam",
+     fileFormat="sam", outfileLoc="/Users/mahmoud/Desktop/John_Work/ChIP-seq/mosaic/",
+     byChr=FALSE, useChrfile=FALSE, chrfile=NULL, excludeChr="chrM",
+     PET=FALSE, fragLen=200, binSize=200, capping=0 )

and get the following output:

> constructBins( infile="/Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam",
+ +     fileFormat="sam", outfileLoc="/Users/mahmoud/Desktop/John_Work/ChIP-seq/mosaic/",
Error: unexpected '=' in:
"constructBins( infile="/Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam",
+     fileFormat="

> +     byChr=FALSE, useChrfile=FALSE, chrfile=NULL, excludeChr="chrM",
Error: unexpected ',' in "+     byChr=FALSE,"
> +     PET=FALSE, fragLen=200, binSize=200, capping=0 )
Error: unexpected ',' in "+     PET=FALSE,"
>

Any help would be appreciated,
Thanks,
John.

Dongjun Chung

unread,
Jun 18, 2015, 1:08:15 AM6/18/15
to mosaics_u...@googlegroups.com

Hi John,

In your command lines, you typed "+". You actually need to write your command lines without "+".

Best,
Dongjun

--
You received this message because you are subscribed to the Google Groups "MOSAiCS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mosaics_user_gr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

John

unread,
Jun 23, 2015, 5:33:52 AM6/23/15
to mosaics_u...@googlegroups.com
Thanks Dongjun!
To unsubscribe from this group and stop receiving emails from it, send an email to mosaics_user_group+unsub...@googlegroups.com.

John

unread,
Jun 23, 2015, 5:49:14 AM6/23/15
to mosaics_u...@googlegroups.com
Hello again,

I get an error message when using a sam file that looks like the header (see below) is not being accepted.  The alignement is the default output of bowtie 2.  More details are below but any help in fixing this would be greatly appreciated.



Using this command:



constructBins( infile="/Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam", fileFormat="bowtie", outfileLoc="/Users/mahmoud/Desktop/John_Work/ChIP-seq/mosaic/", byChr=FALSE, useChrfile=FALSE, chrfile=NULL, excludeChr="chrM", PET=FALSE, fragLen=200, binSize=200, capping=0 )



With the file format set to either sam or bowtie, the input file being the default output from using bowtie2 (is this the issue, that its not bowtie?) the top few lines looking like this:



@HD     VN:1.0  SO:unsorted
@SQ     SN:gi|408675720|ref|NC_018750.1|        LN:8226158
@PG     ID:bowtie2      PN:bowtie2      VN:2.1.0
HWI-D00382:138:C40G6ANXX:7:1101:1359:2142       0       gi|408675720|ref|NC_018750.1|   5608269 42      51M     *       0       0       CAGATGTGGGCCGCCCACTTCATCGACTACGAGCGGCCGGCCACCTGGCTG     BBBBBFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF     AS:i:0  XN:i:0  XM:i:0  XO:i:0  XG:i:0  NM:i:0  MD:Z:51 YT:Z:UU
HWI-D00382:138:C40G6ANXX:7:1101:1715:2029       0       gi|408675720|ref|NC_018750.1|   2421921 42      51M     *       0       0       NAGAGATCGTTCCGCCGGACCGCGGCCCTCGTGAAGGGCGGCGGCCCGTCA     #<BBBFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF     AS:i:-1 XN:i:0  XM:i:1  XO:i:0  XG:i:0  NM:i:1  MD:Z



I get this output message:


> constructBins( infile="/Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam", fileFormat="sam", outfileLoc="/Users/mahmoud/Desktop/John_Work/ChIP-seq/mosaic/", byChr=FALSE, useChrfile=FALSE, chrfile=NULL, excludeChr="chrM", PET=FALSE, fragLen=200, binSize=200, capping=0 )
------------------------------------------------------------
Info: setting summary
------------------------------------------------------------
Name of aligned read file: /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam
Aligned read file format: SAM
Directory of processed bin-level files: /Users/mahmoud/Desktop/John_Work/ChIP-seq/mosaic/
Construct bin-level files by chromosome? N
Is file for chromosome info provided? N
List of chromosomes to be excluded: chrM
Data type: Single-end tag (SET)
Average fragment length: 200
Bin size: 200
------------------------------------------------------------
Info: reading the aligned read file and processing it into bin-level files...
Info: done!
------------------------------------------------------------
Info: processing summary
------------------------------------------------------------
Directory of processed bin-level files: /Users/mahmoud/Desktop/John_Work/ChIP-seq/mosaic/
Processed bin-level file: NsrR_18h_Flag.sam_fragL200_bin200.txt
------------------------------------------------------------
Warning message:
running command 'perl  /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam /Users/mahmoud/Desktop/John_Work/ChIP-seq/mosaic/ sam 200 200 0 N N - chrM  ' had status 255
Bareword found where operator expected at /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam line 1, near "@HD    VN"
    (Missing operator before VN?)
Bareword found where operator expected at /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam line 1, near "1.0    SO"
    (Missing operator before SO?)
Array found where operator expected at /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam line 2, at end of line
    (Missing semicolon on previous line?)
Bareword found where operator expected at /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam line 2, near "@SQ    SN"
    (Missing operator before SN?)
Array found where operator expected at /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam line 3, at end of line
    (Missing semicolon on previous line?)
Bareword found where operator expected at /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam line 3, near "@PG    ID"
    (Missing operator before ID?)
Semicolon seems to be missing at /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam line 3.
Number found where operator expected at /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam line 4, near "2142    0"
    (Missing operator before     0?)
Bareword found where operator expected at /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam line 4, near "0    gi"
    (Missing operator before gi?)
Number found where operator expected at /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam line 4, near "5608269    42"
    (Missing operator before     42?)
Number found where operator expected at /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam line 4, near "42    51"
    (Missing operator before     51?)
Bareword found where operator expected at /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam line 4, near "51M"
    (Missing operator before M?)
Number found where operator expected at /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam line 4, near "0    0"
    (Missing operator before     0?)
Bareword found where operator expected at /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam line 4, near "0    CAGATGTGGGCCGCCCACTTCATCGACTACGAGCGGCCGGCCACCTGGCTG"
    (Missing operator before CAGATGTGGGCCGCCCACTTCATCGACTACGAGCGGCCGGCCACCTGGCTG?)
Bareword found where operator expected at /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam line 4, near "0    XN"
    (Missing operator before XN?)
Bareword found where operator expected at /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam line 4, near "0    XM"
    (Missing operator before XM?)
Bareword found where operator expected at /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam line 4, near "0    XO"
    (Missing operator before XO?)
Bareword found where operator expected at /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam line 4, near "0    XG"
    (Missing operator before XG?)
Bareword found where operator expected at /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam line 4, near "0    NM"
    (Missing operator before NM?)
Bareword found where operator expected at /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam line 4, near "0    MD"
    (Missing operator before MD?)
Bareword found where operator expected at /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam line 4, near "51    YT"
    (Missing operator before YT?)
Number found where operator expected at /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam line 5, near "2029    0"
    (Missing operator before     0?)
Bareword found where operator expected at /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam line 5, near "0    gi"
    (Missing operator before gi?)
Number found where operator expected at /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam line 5, near "2421921    42"
    (Missing operator before     42?)
Number found where operator expected at /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam line 5, near "42    51"
    (Missing operator before     51?)
Bareword found where operator expected at /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam line 5, near "51M"
    (Missing operator before M?)
Number found where operator expected at /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam line 5, near "0    0"
    (Missing operator before     0?)
Bareword found where operator expected at /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam line 5, near "0    NAGAGATCGTTCCGCCGGACCGCGGCCCTCGTGAAGGGCGGCGGCCCGTCA"
    (Missing operator before NAGAGATCGTTCCGCCGGACCGCGGCCCTCGTGAAGGGCGGCGGCCCGTCA?)
Number found where operator expected at /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam line 6, near "2147    16"
    (Missing operator before     16?)
Bareword found where operator expected at /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam line 6, near "16    gi"
    (Missing operator before gi?)
Number found where operator expected at /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam line 6, near "2438046    42"
    (Missing operator before     42?)
Number found where operator expected at /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam line 6, near "42    51"
    (Missing operator before     51?)
Bareword found where operator expected at /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam line 6, near "51M"
    (Missing operator before M?)
Number found where operator expected at /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam line 6, near "0    0"
    (Missing operator before     0?)
Bareword found where operator expected at /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam line 6, near "0    TTCCAGGGAGTGGGTGAGCCGGGTGCGGGGGCTGGCGTCCCAGGCGTGGCC"
    (Missing operator before TTCCAGGGAGTGGGTGAGCCGGGTGCGGGGGCTGGCGTCCCAGGCGTGGCC?)
syntax error at /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam line 1, near "@HD    VN"
Unterminated <> operator at /Users/mahmoud/Desktop/John_Work/ChIP-seq/NsrR_18h_Flag.sam line 6.
Reply all
Reply to author
Forward
0 new messages